7 Replies Latest reply on Aug 14, 2014 11:03 AM by facewreck

    Problem Involving JBoss Upgrade

    facewreck

      Hello, I have an issue involving a JBoss Upgrade from 3.1/3.2 to JBoss EaP 6.2 and could use some assistance.  Basically, I have a .ear deployment, ABC.ear, with two sub-deployments: ABC-EJB.jar and Web-Client.war.  The Web-Client.war is dependent on ABC-EJB.jar as it uses several EJB's contained within it.  ABC-EJB.jar and its constituents load correctly. The server startup fails right as the .war attempts to access the .ejb's of ABC-EJB.jar.  I've tried (1) explicitly setting dependencies with Manifest.MF and Jboss-Deployment-sturcture.xml, (2) placing the .jar in web/lib in the .war and setting isolation flag = false, (3) moving .jar to .ear/lib, (4) modifying application load order in application.xml, and (4) a host of other small attempted solutions.  I'm nearly positive that it isn't a classloader or dependency issue. The specefic error I get in Cygwin is:

       

       

      09:08:28,636 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC000001: Failed to start service jboss.deployment.subunit."ABC.ear"."web-client.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ABC.ear"."web-client.war".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "web-client.war" of deployment "ABC.ear"

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

              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:895) [rt.jar:1.6.0_45]

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

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

      Caused by: java.lang.RuntimeException: JBAS014187: Could not load view com.ABC.ejb.AccountManagerHome

              at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:93)

              at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:95)

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

              ... 5 moreC

      Caused by: java.lang.ClassNotFoundException: com.ocf.ejb.AccountManagerHome from [Module "deployment.ABC.ear.web-client.war:main" from Service Module Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]

              at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_45]

              at java.lang.Class.forName(Class.java:249) [rt.jar:1.6.0_45]

              at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

              at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:91)

              ... 7 more

       

      Any assistance would be greatly appreciated.

        • 1. Re: Problem Involving JBoss Upgrade
          wdfink

          I prefer to pack the interfaces in a separate jar and add it to the EAR/lib folder of the archive.

          Other possiblity is to configure the classloading, see Class Loading in AS7

          • 2. Re: Problem Involving JBoss Upgrade
            facewreck

            Thanks, I've tried both and I get the same error.

            • 3. Re: Problem Involving JBoss Upgrade
              dallasdavis0

              If I could speculate, your deploying ejb spec 2.x or 3.x? I am not sure if Jboss7 + supports < 3.x spec. Is there an ejb-jar.xml or using annotations? The obvious is the *home.class file is not in the jar, explaining the ClassNotFoundException. BUT, EJB 3.x doesn't use the Home Interface any longer, there has to be a reference somewhere in the war, either code or web.xml.. something. EJB 2.x spec had ejb-ref tag's that are still supported by http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd, but not valid in EJB 3.x spec. Maybe i'm way off, something seems tied to the old 2.1 spec. Not super familiar with EJB, more of a Spring person, hope I didnt add to the confusion.

               

              LMK


              D

              • 4. Re: Problem Involving JBoss Upgrade
                jaikiran

                Where exactly is com.ocf.ejb.AccountManagerHome located? Also, please post the output of the following commands:

                 

                jar -tf ABC.ear

                 

                jar -tf web-client

                 

                and

                 

                jar -tf TheJarWhichYouArePlacingInEarLib.jar

                • 5. Re: Problem Involving JBoss Upgrade
                  facewreck

                  Thanks, this is correct.  Apparently, we were using two versions of EJB's (2.1 and 3.0).  JBoss 7, however, supports only EJB 3.0+.  EJB 3.0 dispenses with Home Interface going with annotations instead.  The web.xml of our .war file contained Home interface .xml code referring to our EJB's producing the errors.  By modifying our web.xml (removing the Home Interface references) we were able to resolve our problem.  Thanks again!

                  • 6. Re: Problem Involving JBoss Upgrade
                    ctomc

                    Adam Gerard wrote:

                     

                    Thanks, this is correct.  Apparently, we were using two versions of EJB's (2.1 and 3.0).  JBoss 7, however, supports only EJB 3.0+. 

                    AS7 / EAP6 supports EJB 2.1 just fine... But i am not sure how it is when you mix both.

                    • 7. Re: Problem Involving JBoss Upgrade
                      facewreck

                      Hi, yes, let me correct myself.  AS7 may very well support a full-fledged EJB 2.1 deployment.  We found a few pieces of documentation/comments that suggested otherwise but after deeper consideration 2.1 may very well be fine when deployed by itself.  The real issue is that the code wasn't cleaned up beforehand and mixed two EJB versions which led to the issue that arose.  Thanks!