6 Replies Latest reply on Sep 29, 2011 2:38 AM by vi .

    How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?

    Adrian Zuo Newbie

      All

         Out product is running based on the Jboss 4.2.2, now we are plan to port it to the Jboss 7.0.1. So can anyone give me some guidline to finish the work? Many thanks in advance!

        • 2. Re: How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?
          Adrian Zuo Newbie

          Daniel

               

          Thanks for your reply!

          Can you give me a ear file sample to me for reference which can run successfully under Jboss AS 7?

           

          Regards,

          Adrian

          • 3. Re: How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?
            Daniel Bevenius Master

            Hi Adrian,

             

            you can build this project which will produce and ear but it is build as a step-by-step tutorial for some of the issues that you might see when migrating to AS7 from a previous version. But if you just follow the steps you'll have an ear that deploys to AS7. Perhaps you can use this as a starting point.

             

            Regards,

             

            /Daniel

            • 4. Re: How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?
              Adrian Zuo Newbie

              He Daniel

               

              I copied one war from old version platform to the new one, now I met below exceptions, how to correct them?

               

              10:29:19,236 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "jcr-explorer.war"

              10:29:22,642 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) added javax.persistence.api dependency to jcr-explorer.war

              10:29:22,986 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."jcr-explorer.w

              r".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jcr-explorer.war".POST_MODULE: Failed to process phase PO

              T_MODULE of deployment "jcr-explorer.war"

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                      at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

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

              Caused by: java.lang.NoClassDefFoundError: javax/jcr/Credentials

                      at java.lang.Class.getDeclaredConstructors0(Native Method) [:1.6.0_26]

                      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [:1.6.0_26]

                      at java.lang.Class.getConstructor0(Class.java:2699) [:1.6.0_26]

                      at java.lang.Class.getConstructor(Class.java:1657) [:1.6.0_26]

                      at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:105)

                      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                      ... 5 more

              Caused by: java.lang.ClassNotFoundException: javax.jcr.Credentials from [Module "deployment.jcr-explorer.war:main" from Service Module Loader]

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

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

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

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

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

                      ... 11 more

               

              10:29:23,033 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 1) Deployment of "jcr-explorer.war" was rolled back with failur

              message {"Failed services" => {"jboss.deployment.unit.\"jcr-explorer.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jbo

              s.deployment.unit.\"jcr-explorer.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"jcr-explorer.war\""}}

              10:29:24,814 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Stopped deployment jcr-explorer.war in 1779ms

              10:29:24,814 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 2) {"Composite operation failed and was rolled back. Steps that failed

              " => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"jcr-explorer.war\".POST_MODULE" => "org.jboss.msc.service.StartExcep

              ion in service jboss.deployment.unit.\"jcr-explorer.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"jcr-explorer.war\""}}

              }

              • 5. Re: How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?
                Adrian Zuo Newbie

                He Daniel

                 

                After I added the missed jar to the folder WEB-INF\lib\, now I met below issues, it also seems the deployment failed:

                 

                 

                11:10:32,330 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Starting deployment of "jcr-explorer.war"

                11:10:36,736 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api dependency to jcr-explorer.war

                11:10:44,205 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-4) The listener "org.apache.myfaces.webapp.StartupServletCont

                extListener" is already configured for this context. The duplicate definition has been ignored.

                11:10:44,736 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) Reading standard config org/apache/myfaces/resource/s

                tandard-faces-config.xml

                11:10:45,096 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) Reading config vfs:/D:/jboss-as-7.0.1/bin/content/jcr

                -explorer.war/WEB-INF/lib/tomahawk-1.1.5.jar/META-INF/faces-config.xml

                11:10:45,127 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) Reading config /WEB-INF/faces-config.xml

                11:10:45,158 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) MyFaces-package : myfaces-api not found.

                11:10:45,158 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) MyFaces-package : myfaces-impl not found.

                11:10:45,158 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) MyFaces-package : tomahawk-sandbox not found.

                11:10:45,158 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) MyFaces-package : tomahawk not found.

                11:10:45,908 INFO    [org.apache.myfaces.config.FacesConfigurator] (MSC service thread 1-4) Serialization provider : class org.apache.myfaces.sha

                red_impl.util.serial.DefaultSerialFactory

                11:11:32,315 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Did not receive a response to the deployment operation within the al

                lowed timeout period [60 seconds]. Check the server configurationfile and the server logs to find more about the status of the deployment.

                11:11:32,315 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "jcr-explorer.war" was rolled back with failure

                message Operation cancelled

                11:13:01,769 INFO    [org.apache.myfaces.webapp.StartupServletContextListener] (MSC service thread 1-4) ServletContext 'D:\jboss-as-7.0.1\standal

                one\tmp\vfs\temp929897404f6e6c13\jcr-explorer.war-e32ff3f6213cc3a3\' initialized.

                11:13:01,926 INFO  [org.jboss.web] (MSC service thread 1-4) registering web context: /jcr-explorer

                11:13:02,254 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment jcr-explorer.war in 89935ms

                • 6. Re: How to upgrade application from Jboss 4.2.2 to Jboss 7.0.1?
                  vi . Newbie

                  Hi Daniel

                      

                       I'm facing  a similar issue , I'm trying to migrate my application from 4.2.2 to jboss 7.0.2 , any way that i could fix this

                   

                   

                   

                   

                  4:34:30,343 INFO  [org.jboss.jpa] (MSC service thread 1-4) read persistence.xml for cares-mgmt

                  14:34:30,358 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added javax.persistence.api, javaee.api, org.jboss.as.jpa, org.javassist dependencies to cares-core-1.0-SNAPSHOT.jar

                  14:34:30,360 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added (default provider) org.hibernate dependency to application deployment (since 1 PU(s) didn't specify jboss.as.jpa.providerModule)

                  14:34:30,362 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) added org.hibernate dependency to application deployment

                  14:34:30,403 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."cares-core-1.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cares-core-1.0-SNAPSHOT.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "cares-core-1.0-SNAPSHOT.jar"

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

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

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

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

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

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

                  Caused by: java.lang.RuntimeException: Error getting reflective information for class com.core.business.common.impl.StatusMgmtServiceImpl

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

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

                      at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.processTransactionAttributeAnnotation(TransactionAttributeMergingProcessor.java:76)

                      at org.jboss.as.ejb3.deployment.processors.merging.TransactionAttributeMergingProcessor.handleAnnotations(TransactionAttributeMergingProcessor.java:61)

                      at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.processComponentConfig(AbstractMergingProcessor.java:87)

                      at org.jboss.as.ejb3.deployment.processors.merging.AbstractMergingProcessor.deploy(AbstractMergingProcessor.java:72)

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

                      ... 5 more

                  Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Priority

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

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

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

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

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

                      ... 11 more

                  Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority from [Module "deployment.cares-core-1.0-SNAPSHOT.jar:main" from Service Module Loader]

                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                      ... 16 more

                   

                  14:34:30,419 ERROR [org.jboss.as] (MSC service thread 1-8) JBoss AS 7.0.2.Final "Arc" started (with errors) in 2381ms - Started 104 of 162 services (1 services failed or missing dependencies, 57 services are passive or on-demand)

                  14:34:30,420 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "cares-core-1.0-SNAPSHOT.jar" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"cares-core-1.0-SNAPSHOT.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"cares-core-1.0-SNAPSHOT.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"cares-core-1.0-SNAPSHOT.jar\""}}

                  14:34:30,436 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) Stopped deployment cares-core-1.0-SNAPSHOT.jar in 16ms

                  14:34:30,440 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"cares-core-1.0-SNAPSHOT.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"cares-core-1.0-SNAPSHOT.jar\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"cares-core-1.0-SNAPSHOT.jar\""}}}}