1 Reply Latest reply on Oct 15, 2013 5:31 AM by sachin.dhingra

    Classes of WAR file couldn't able to access the JAR file EJB's (Error getting reflective information for class X)

    sachin.dhingra

      Hi,

       

      I have a ear file which consists of jar and war file. My WAR file is accessing the EJB's in JAR file but when I am deploying the ea file to the JBOSS EAP 6.1.0 GA, it is not able to load those local interfaces which is getting used in WAR servlets and other POJO classes. Below is the error trace:

      08:15:23,117 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."xxxHubWeb.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."xxxHubWeb.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "xxxHubWeb.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]

       

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.xxx.xxxhubserver.servlet.WECInitialLoadServlet with ClassLoader ModuleClassLoader for Module "deployment.xxxHubWeb.war:main" from Service Module Loader

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          ... 5 more

       

      Caused by: java.lang.NoClassDefFoundError: Lcom/xxx/xxxhubserver/wec/sessionbean/IWECInitialLoadBeanLocal;

          at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_26]

          at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [rt.jar:1.6.0_26]

          at java.lang.Class.getDeclaredFields(Class.java:1743) [rt.jar:1.6.0_26]

          at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

          ... 10 more

       

      Caused by: java.lang.ClassNotFoundException: com.xxx.xxxhubserver.wec.sessionbean.IWECInitialLoadBeanLocal from [Module "deployment.xxxHubWeb.war:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.2.0.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:399) [jboss-modules.jar:1.2.0.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1]

          ... 15 more

       

      This IWECInitialLoadBeanLocal is the local interface which is inside my JAR file and WECInitialLoadServlet is my servlet which is inside my WAR file.


      I have tried placing the classpath entry to MANIFEST.MF file of my war file pointing to the JAR file which has the local interface but no luck.