1 2 3 Previous Next 34 Replies Latest reply: Jun 18, 2012 8:08 AM by Sueleyman Vurucu RSS

    Classloading in JBOSS AS 7.1.0.Final

    Sueleyman Vurucu Expert

      Hi @ all,

       

      I must migrate an EJB 2.1 Application, which runnings in JBOSS 5.1.0 to JBOSS 7.1.0.Final and EJB 3.1.

       

      The Migration of EJB is well done under JBOSS 6.1.0.Final.

       

      I see that the Classloading in JBOSS 7.1.0.Final is refactored as well. So far so good.

       

      So when I deploy the same EAR in JBOSS 7.1.0.Fina I get the Exception shown below:

       

      08:33:27,667 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."WMS_BASE.ear"."WMS_BASE_CONTROLLER.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."WMS_BASE.ear"."WMS_BASE_CONTROLLER.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "WMS_BASE_CONTROLLER.jar" of deployment "WMS_BASE.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

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

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

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

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

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

      Caused by: java.lang.RuntimeException: Error getting reflective information for class com.siemag.server.orderprocessing.dao.OrderProcessorDAO with ClassLoader ModuleClassLoader for Module "deployment.WMS_BASE.ear.WMS_BASE_CONTROLLER.jar:main" from Service Module Loader

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

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

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

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

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

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

          ... 5 more

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/HibernateException

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

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

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

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

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

          ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.HibernateException from [Module "deployment.WMS_BASE.ear.WMS_BASE_CONTROLLER.jar:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 15 more

       

      This Exception occurs for all my EJB jars. So if I add "Dependencies: org.hibernate" in the Manifest for one of EJB jar then are alle the Excpetions, for other modules too, away.

       

      After this cahange I get an Excpetion shown below:

      08:48:49,090 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."WMS_BASE.ear"."WMS_BASE_CONTROLLER.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."WMS_BASE.ear"."WMS_BASE_CONTROLLER.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "WMS_BASE_CONTROLLER.jar" of deployment "WMS_BASE.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

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

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

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

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

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

      Caused by: java.lang.RuntimeException: Error getting reflective information for class com.siemag.server.timer.ExportCoilsToFilesTimerBean with ClassLoader ModuleClassLoader for Module "deployment.WMS_BASE.ear.WMS_BASE_CONTROLLER.jar:main" from Service Module Loader

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

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

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

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

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

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

          ... 5 more

      Caused by: java.lang.NoClassDefFoundError: jxl/write/biff/RowsExceededException

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

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

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

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

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

          ... 10 more

      Caused by: java.lang.ClassNotFoundException: jxl.write.biff.RowsExceededException from [Module "deployment.WMS_BASE.ear.WMS_BASE_CONTROLLER.jar:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 15 more

       

      So the jxl.jar is located in jboss-as-7.1.0.Final\standalone\lib. Why can't find JBOSS the libs automatically like in the past or must I turn a switcht for do that work?

        • 1. Re: Classloading in JBOSS AS 7.1.0.Final
          jaikiran pai Master

          Sueleyman Vurucu wrote:

           

          So the jxl.jar is located in jboss-as-7.1.0.Final\standalone\lib.

          That location isn't meant for placing the application jars. You'll have to package the jxl.jar within the .ear/lib folder (create the folder if it isn't currently there). That's what the EE spec says about application libraries.

           

          For more details on AS7 classloading, take a look at https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7

          • 2. Re: Classloading in JBOSS AS 7.1.0.Final
            Sueleyman Vurucu Expert

            If I add this in my standalone.xml

             

            <subsystem xmlns="urn:jboss:domain:ee:1.0" >

                        <global-modules>

                            <module name="org.hibernate"/>

                            <module name="my.company.modules"/>

                          </global-modules>

                    </subsystem>

             

            Then the libs will be found.

             

            The module my.company.modules:

            <module xmlns="urn:jboss:module:1.1" name="com.siemag.modules">

             

                <resources>

                    <resource-root path="jxl.jar"/>

                    <!-- Insert resources here -->

                </resources>

                <dependencies>

                </dependencies>

            </module>

             

            Must I use the modules subsystem for making libs global available ?

            But for what purpose standing the server lib directory ?

             

            My application uses Drools as well. Must I make a separate module for drools too ??

            • 3. Re: Classloading in JBOSS AS 7.1.0.Final
              Sueleyman Vurucu Expert

              Thanks for reply jaikiran,

               

              I don't want use the internal lib folder inside the EAR. Because we use very large collection of libs. And this make the deployment so large. What shold I do with drools libs ??

              • 4. Re: Classloading in JBOSS AS 7.1.0.Final
                Ram J Newbie

                Hi Vurucu,

                 

                Did you get any solution for adding jar's to the JBOSS AS 7.1 application server, other than create a module for every jar file.

                • 5. Re: Classloading in JBOSS AS 7.1.0.Final
                  Sueleyman Vurucu Expert

                  Hi Ram j,

                   

                  as I know you have two options,

                   

                  1. Add your jars in the lib directory of your deployment.

                  2. Create one module pack your jars there. Then make it either global available in your server configuration e.g standalone-full.xml or only for your your deployment. Then you must create a jboss-deployment-structure.xml in the META-INF of your EAR or WEB-INF of your WAR.

                   

                  I can describe it in more details if your need it.

                  • 6. Re: Classloading in JBOSS AS 7.1.0.Final
                    Bajrang Asthana Newbie

                    Hello Sueleyman,

                     

                    I will be great help if you can elaborate your solution in details. I am facing the same problem.

                    Below is deatials-

                     

                    Ear file  structure-

                     

                    /META-INF

                         /MANIFEST.MF

                         /application.xml

                         /jboss-app.xml

                    /app.jar

                    /app.war

                    /test.jar

                    /jboss-seam-debug.jar

                    /jboss-seam.jar

                     

                    and application.xml file is-

                     

                    <application>

                      <display-name>Pro</display-name>

                     

                      <module>

                        <web>

                          <web-uri>app.war</web-uri>

                          <context-root>/pro</context-root>

                        </web>

                      </module>

                     

                      <module>

                        <ejb>app.jar</ejb>

                      </module>

                      <module>

                        <ejb>test.jar</ejb>

                      </module>

                     

                      <module>

                        <java>jboss-seam.jar</java>

                      </module>

                     

                      <module>

                        <java>quartz-1.5.2.jar</java>

                      </module>

                     

                    </application>

                     

                    I am getting below error-

                    11:12:27,058 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."pro.ear"."app.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear"."app.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.jar" of deployment "pro.ear"

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                        at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]

                    Caused by: java.lang.RuntimeException: Error getting reflective information for class no.messageman.protectoria.core.security.URLLogin with ClassLoader ModuleClassLoader for Module "deployment.pro.ear.app.jar:main" from Service Module Loader

                        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                        ... 5 more

                    Caused by: java.lang.NoClassDefFoundError: Lorg/jboss/seam/core/FacesMessages;

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

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

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

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

                        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                        ... 10 more

                    Caused by: java.lang.ClassNotFoundException: org.jboss.seam.core.FacesMessages from [Module "deployment.pro.ear.app.jar:main" from Service Module Loader]

                        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                        ... 15 more

                     

                    11:12:27,199 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."pro.ear"."app.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear"."app.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.war" of deployment "pro.ear"

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                        at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]

                    Caused by: java.lang.RuntimeException: Error getting reflective information for class no.messageman.protectoria.core.junit.JunitTestServlet with ClassLoader ModuleClassLoader for Module "deployment.pro.ear.test.jar:main" from Service Module Loader

                        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                        ... 5 more

                    Caused by: java.lang.NoClassDefFoundError: junit/framework/TestSuite

                        at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.6.0_21]

                        at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [rt.jar:1.6.0_21]

                        at java.lang.Class.getDeclaredMethods(Class.java:1791) [rt.jar:1.6.0_21]

                        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                        ... 10 more

                    Caused by: java.lang.ClassNotFoundException: junit.framework.TestSuite from [Module "deployment.pro.ear.test.jar:main" from Service Module Loader]

                        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                        ... 15 more

                     

                    Please suggest.

                    • 7. Re: Classloading in JBOSS AS 7.1.0.Final
                      Sueleyman Vurucu Expert

                      Caused by: java.lang.ClassNotFoundException: junit.framework.TestSuite from [Module "deployment.pro.ear.test.jar:main" from Service Module Loader]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                          ... 15 more

                       

                       

                      I assume that your test.jar have dependecies to junit. If you're using maven then your test cases should be placed in src/main/test.

                      • 8. Re: Classloading in JBOSS AS 7.1.0.Final
                        Bajrang Asthana Newbie

                        I am using apache ant script... below is location of test cases-

                         

                        /project

                             /src

                             /test -------> all test cases are kept here

                         

                        Howevere the same code is working in Jboss 4.2 AS.

                        • 9. Re: Classloading in JBOSS AS 7.1.0.Final
                          Sueleyman Vurucu Expert

                          Can you look in your test.jar if it contains the test classes ? If it so then your build process should delete them.

                          • 10. Re: Classloading in JBOSS AS 7.1.0.Final
                            Bajrang Asthana Newbie

                            Yes, I can see there are test classes inside the test.jar.....should I just create an empty jar?

                             

                            However I have also tried to add the class path of test.jar in app.jar like below-

                             

                            <jar destfile="${build.jars}/app.jar">

                                        <fileset dir="${build.classes}">

                                            <include name="**/*.class" />

                                            <include name="**/*.properties" />

                                        </fileset>

                                        .

                                        .

                                        .

                                        <metainf dir="${resources}/META-INF">

                                            <include name="persistence.xml" />

                                            <include name="ejb-jar.xml" />

                                        </metainf>

                                        <manifest>

                                            <attribute name="Class-Path" value="test.jar " />

                                        </manifest>

                                    </jar>

                             

                            but it did not work for me.

                             

                            Thanks 4 ur reply.

                            • 11. Re: Classloading in JBOSS AS 7.1.0.Final
                              Sueleyman Vurucu Expert

                              try

                               

                              <fileset dir="${build.classes}">

                                              <include name="src/**/*.class" />

                                              <include name="src/**/*.properties" />

                                          </fileset>

                               

                              or something like that. I'm not so familar with ant. You must somehow exclude your test folder from the build.

                               

                              The easiest way to solve your problem to exclude the test.jar from your deployment. If it doesn't  need from your app due the runtime of course.

                              • 12. Re: Classloading in JBOSS AS 7.1.0.Final
                                Bajrang Asthana Newbie

                                I have excluded the test.jar but still I am getting exceptions-

                                 

                                 

                                12:34:42,170 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for pro.ear

                                12:34:43,092 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named Dispatcher in deployment unit subdeployment "jboss-seam.jar" of deployment "pro.ear.ear" are as follows:

                                 

                                    java:global/pro.ear/jboss-seam/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                    java:app/jboss-seam/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                    java:module/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                    java:global/pro.ear/jboss-seam/Dispatcher

                                    java:app/jboss-seam/Dispatcher

                                    java:module/Dispatcher

                                 

                                12:34:43,092 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named TransactionListener in deployment unit subdeployment "jboss-seam.jar" of deployment "pro.ear.ear" are as follows:

                                 

                                    java:global/pro.ear/jboss-seam/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                    java:app/jboss-seam/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                    java:module/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                    java:global/pro.ear/jboss-seam/TransactionListener

                                    java:app/jboss-seam/TransactionListener

                                    java:module/TransactionListener

                                 

                                12:34:43,123 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.subunit."pro.ear.ear"."app.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear.ear"."app.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.jar" of deployment "pro.ear.ear"

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]

                                Caused by: java.lang.RuntimeException: Error getting reflective information for class no.messageman.pro.ear.core.web.UIAddressBookHandler with ClassLoader ModuleClassLoader for Module "deployment.pro.ear.ear.app.jar:main" from Service Module Loader

                                    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    ... 5 more

                                Caused by: java.lang.NoClassDefFoundError: Ljavax/faces/component/html/HtmlDataTable;

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

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

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

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

                                    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    ... 10 more

                                Caused by: java.lang.ClassNotFoundException: javax.faces.component.html.HtmlDataTable from [Module "deployment.pro.ear.ear.app.jar:main" from Service Module Loader]

                                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                    ... 15 more

                                 

                                12:34:43,607 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."pro.ear.ear"."app.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear.ear"."app.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.war" of deployment "pro.ear.ear"

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]

                                Caused by: java.lang.RuntimeException: Error getting reflective information for class no.messageman.pro.ear.init.ProtectoriaInitServlet with ClassLoader ModuleClassLoader for Module "deployment.pro.ear.ear.app.jar:main" from Service Module Loader

                                    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

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

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

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

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

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    ... 5 more

                                Caused by: java.lang.NoClassDefFoundError: Lno/messageman/sbo/erpadapter/JMSQueueListener;

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

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

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

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

                                    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                                    ... 10 more

                                Caused by: java.lang.ClassNotFoundException: no.messageman.sbo.erpadapter.JMSQueueListener from [Module "deployment.pro.ear.ear.app.jar:main" from Service Module Loader]

                                    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                                    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                    ... 15 more

                                 

                                12:34:43,623 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990

                                12:34:43,623 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 27386ms - Started 191 of 288 services (10 services failed or missing dependencies, 86 services are passive or on-demand)

                                12:34:43,842 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "pro.ear.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"pro.ear.ear\".\"app.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"pro.ear.ear\".\"app.war\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"app.war\" of deployment \"pro.ear.ear\"","jboss.deployment.subunit.\"pro.ear.ear\".\"app.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"pro.ear.ear\".\"app.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"app.jar\" of deployment \"pro.ear.ear\""},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListenerMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener]","jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.DispatcherMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher]","jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.DispatcherMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher]","jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListenerMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener]"]}

                                12:34:43,951 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment test.jar in 113ms

                                12:34:43,951 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment app.jar in 115ms

                                12:34:43,951 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment jboss-seam.jar in 116ms

                                12:34:43,998 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment quartz-1.5.2.jar in 163ms

                                12:34:48,107 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment app.war in 4270ms

                                12:34:48,294 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment pro.ear.ear in 4456ms

                                12:34:48,294 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

                                JBAS014775:    New missing/unsatisfied dependencies:

                                      service jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher (missing) dependents: [service jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.ValidatorFactory, service jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.Validator]

                                      service jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener (missing) dependents: [service jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.ValidatorFactory, service jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.Validator]

                                JBAS014777:   Services which failed to start:      service jboss.deployment.subunit."pro.ear.ear"."app.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear.ear"."app.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.war" of deployment "pro.ear.ear"

                                      service jboss.deployment.subunit."pro.ear.ear"."app.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pro.ear.ear"."app.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "app.jar" of deployment "pro.ear.ear"

                                 

                                12:34:48,310 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"pro.ear.ear\".\"app.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"pro.ear.ear\".\"app.war\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"app.war\" of deployment \"pro.ear.ear\"","jboss.deployment.subunit.\"pro.ear.ear\".\"app.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"pro.ear.ear\".\"app.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"app.jar\" of deployment \"pro.ear.ear\""},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListenerMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener]","jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.DispatcherMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.Validatorjboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher]","jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.DispatcherMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.Dispatcher]","jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListenerMissing[jboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener.ValidatorFactoryjboss.naming.context.java.comp.pro.ear.jboss-seam.TransactionListener]"]}}}

                                • 13. Re: Classloading in JBOSS AS 7.1.0.Final
                                  Sueleyman Vurucu Expert

                                  I'm not familar with seam. I think you mus define it as a module. Can provide your application ??

                                  • 14. Re: Classloading in JBOSS AS 7.1.0.Final
                                    Bajrang Asthana Newbie

                                    Have you seen the application.xml file ...we have defined it as a module.

                                     

                                    <application>

                                      <display-name>Pro</display-name>

                                     

                                      <module>

                                        <web>

                                          <web-uri>app.war</web-uri>

                                          <context-root>/pro</context-root>

                                        </web>

                                      </module>

                                     

                                      <module>

                                        <ejb>app.jar</ejb>

                                      </module>

                                      <module>

                                        <ejb>test.jar</ejb>

                                      </module>

                                     

                                      <module>

                                        <java>jboss-seam.jar</java>

                                      </module>

                                     

                                      <module>

                                        <java>quartz-1.5.2.jar</java>

                                      </module>

                                     

                                    </application>

                                     

                                    As I can see in the log file, Jboss is able to deploy the jboss-seam.jar...but it is throwing exception whent tries to deploy the app.jar ejb3 module

                                    Please see below..

                                    12:34:43,092 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named Dispatcher in deployment unit subdeployment "jboss-seam.jar" of deployment "pro.ear" are as follows:

                                     

                                        java:global/pro/jboss-seam/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                        java:app/jboss-seam/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                        java:module/Dispatcher!org.jboss.seam.core.LocalDispatcher

                                        java:global/pro/jboss-seam/Dispatcher

                                        java:app/jboss-seam/Dispatcher

                                        java:module/Dispatcher

                                     

                                    12:34:43,092 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named TransactionListener in deployment unit subdeployment "jboss-seam.jar" of deployment "pro.ear" are as follows:

                                     

                                        java:global/pro/jboss-seam/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                        java:app/jboss-seam/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                        java:module/TransactionListener!org.jboss.seam.core.LocalTransactionListener

                                        java:global/pro/jboss-seam/TransactionListener

                                        java:app/jboss-seam/TransactionListener

                                        java:module/TransactionListener

                                     

                                    BTW thanks for your help.

                                    1 2 3 Previous Next