2 Replies Latest reply on Jun 24, 2014 2:54 PM by ravikatkar

    how to load a class from jar if jar is deployed   dynamically using teiid admin api


      HI Team,


      facing issue with loading the class with below use case


      i have a jar file which i have deployed through the Teiid admin api as archive deployment , ( runtime name of jar is "deployment.myapp.jar" )

      i am trying to load the class using blow Jboss module api



                      final ModuleIdentifier modId = ModuleIdentifier.fromString("deployment.myapp.jar");

                      final Module module = Module.getModuleFromCallerModuleLoader(modId);

                      Class<?> clazz = module.getClassLoader().loadClass(className);


      Module.getModuleFromCallerModuleLoader(modId); is throwing below error


      24 Jun 2014 11:03:54,154 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196)


      24 Jun 2014 11:03:54,156 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444)



      24 Jun 2014 11:03:54,157 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432)


      24 Jun 2014 11:03:54,159 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374)


      24 Jun 2014 11:03:54,160 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVat org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119)
      24 Jun 2014 11:03:54,162 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat java.lang.Class.forName0(Native Method)



      24 Jun 2014 11:03:54,163 ERROR [stderr] (Worker7_QueryProcessorQueue123) lZep+dAoZTVXat java.lang.Class.forName(Class.java:190)



      how load a class when i deploy the jar dynamically ?




      Ravi Katkar