14 Replies Latest reply on Jun 23, 2013 3:21 AM by ozizka

    Migration from jboss 5 to jboss 7

    teena.buchade

      Hi i am new to jboss 7 and need step by step process to migrate my application build in ant to jboss 7.

       

      I have gone through https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7.

       

      Kindly help me with some example or some step.

        • 1. Re: Migration from jboss 5 to jboss 7
          peterj

          The instructions on the linked page seem to cover most possibilities. Exactly what is it that you are having a problem with on your migration? The more details you can provide about your application, what it does, and what technologies it uses (databases, etc), the more help we can provide.

          • 2. Re: Migration from jboss 5 to jboss 7
            teena.buchade

            I am working on a java project which perform document conversion.It uses following technologies

             

            1.Apache ant as build tool

            2.Mysql for database

             

            We deploy 2 large size WAR and a EAR which contain a WAR.

             

            When i try to deploy the WAR i get the following stack trace:

             

            10:11:04,077 INFO  [org.jboss.modules] JBoss Modules version 1.0.2.GA

            10:11:04,295 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA

            10:11:04,327 INFO  [org.jboss.as] JBoss AS 7.0.2.Final "Arc" starting

            10:11:05,045 WARN  [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.

            10:11:05,108 INFO  [org.jboss.as] creating http management service using network interface (management) port (9990)

            10:11:05,108 WARN  [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.

            10:11:05,139 INFO  [org.jboss.as.connector.subsystems.datasources] Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

            10:11:05,139 INFO  [org.jboss.as.clustering.infinispan.subsystem] Activating Infinispan subsystem.

            10:11:05,170 INFO  [org.jboss.as.logging] Removing bootstrap log handlers

            10:11:05,311 INFO  [org.jboss.as.naming] (Controller Boot Thread) JBAS011800: Activating Naming Subsystem

            10:11:05,327 INFO  [org.jboss.as.osgi] (Controller Boot Thread) JBAS011910: Activating OSGi Subsystem

            10:11:05,327 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service

            10:11:05,342 INFO  [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem

            10:11:05,467 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.0.Beta2

            10:11:05,467 INFO  [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.0.Beta3

            10:11:05,483 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.0.Beta3

            10:11:05,780 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem

            10:11:05,874 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-2) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_21\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;.;C:\

            10:11:06,030 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080

            10:11:06,045 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-4) Starting remote JMX connector

            10:11:06,061 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) Listening on /127.0.0.1:9999

            10:11:06,467 INFO  [org.jboss.as.connector] (MSC service thread 1-3) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)

            10:11:06,498 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:jboss/datasources/ExampleDS]

            10:11:06,498 INFO  [org.jboss.as.deployment] (MSC service thread 1-2) Started FileSystemDeploymentService for directory D:\softs\jboss-as-7.0.2.Final\standalone\deployments

            10:11:06,530 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final "Arc" started in 2656ms - Started 94 of 149 services (55 services are passive or on-demand)

            10:11:06,545 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) Starting deployment of "XXX.war"

            10:12:06,621 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configurationfile and the server logs to find more about the status of the deployment.

            10:12:06,637 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "XXX.war" was rolled back with failure message Operation cancelled

             

            I am deploying the war by creating  a blank xxx.war.dodeploy file.

            • 3. Re: Migration from jboss 5 to jboss 7
              rajivtmathew

              Hi Teena,

               

              Have you been able to make any progress on this issue? I'm attempting to migrate a J2EE application from JBoss 5.10.GA to 7.0.1.Final. My application structure appears, at first glance to be something like yours. We have an ear file (exploded directory) containing a war folder, and using standalone-full.xml configuration.

               

              I tried (as suggested on some forums), to include a deployment-timeout="600" attribute to the <deployment-scanner> tag. That didn't seem to help.

              • 4. Re: Migration from jboss 5 to jboss 7
                teena.buchade

                Hi rajivtmathew

                 

                Due to lack of support and help on the issue i have not been able to progress with the issue.

                • 5. Re: Migration from jboss 5 to jboss 7
                  ctomc

                  Hi,

                   

                  did you try with version 7.1.1? does same error occur?

                  Does increse of deployment timeout help?

                   

                  If this does not help, please post output of jar tf  <name-of-your-deployment-archive> so we can see how structure of your app looks like.

                   

                  as with info you have posted there is not enough info to know what is happening.

                   

                  --

                  tomaz

                  • 6. Re: Migration from jboss 5 to jboss 7
                    rajivtmathew

                    We've begun migration to 7.1.0.Final a month agos t, so we're going to try continuing with that for now, unless thiis a known issue with 7.1.0.Final which has been resolved in 7.1.1.

                    As indicated on a couple of community posts, I tried to increase the timeout to 600s using the "deployment-timeout="600" attribute on the <deployment-scanner> tag, but that doesn't work either.

                     

                    As for deployment structure, it is:

                     

                    deployment.ear (exploded)

                       |_> deployment.war (war classes and xhtml) (exploded)

                       |_> META-INF

                       |_> deployment module jars.

                    • 7. Re: Migration from jboss 5 to jboss 7
                      rajivtmathew

                      Hi Tomaz,

                       

                      Anything you see in the deployment structure that could be causing this hang on JBoss deployment of application ear?

                      • 8. Re: Migration from jboss 5 to jboss 7
                        thinksteep

                        Rajiv,

                         

                        Did you try with simple app with same structure? While I was doing migration I had similar issues. I scaled down my app to one/two pages (or) classes in each file structure and tried to deploy, fix issue by issue. This may be another way to tackle this.

                         

                        Few minimum things to take are, 1) application.xml and excluding default modules if you are not using them by adding jboss-deployment-structure.xml.

                         

                        Thank you,

                        • 9. Re: Migration from jboss 5 to jboss 7
                          ctomc

                          Hey,

                           

                          generic description of what you have is not enough to see if there is something fishy.

                          can you try to do jar tf <name-of-your.ear> propably you builld with maven before you copy exploded archive to jboss...

                           

                          or you can paste output of "tree" command which will print while tree of a folder, but please remove webapp directores (where your css,xhtml,javascript is) as output will be huge...

                          really important things are all libs (ear lib and war lib) and config files + general structure.

                           

                          --

                          tomaz

                          • 10. Re: Migration from jboss 5 to jboss 7
                            ctomc

                            Hi,

                             

                            regarding the structure you send me on PM.

                             

                            First thing that looks wrong is that you have "lib" jars in root of ear, this was changed in ee6 spec that it has to be in a folder (which folder is configurable in application.xml) by default in lib.

                            so i would recomend you to move all jars that are not deployable (not explicitly defined in application.xml) to lib folder.

                             

                            Also i would remove jars:

                             

                            • activation-1.1.jar <-- part of ee6 and since java6 part of jdk, no need to bundle
                            • hibernate-annotations.jar
                            • hibernate-commons-annotations.jar
                            • hibernate-core.jar --> hibernate 4 is allready bundled
                            • hibernate-entitymanager.jar --> same as above
                            • hibernate 3 --> leftover? 
                            • hibernate-search-engine-4.0.0.Final.jar ??
                            • hibernate-search-orm-4.0.0.Final.jar ??
                            • hibernate-search.jar ?? do you use hsearch 3 or 4?
                            • hibernate-validator.jar --> hibernate validator is now part of ee6 and part of as7 no need
                            • hibernate3.jar --> lefover?
                            • hornetq-core-2.2.11.Final.jar --> hornetq is as7 jms provider and part of distributuion. no need to include it in you app
                            • hornetq-jms-2.2.11.Final.jar --> same as above
                            • hornetq-ra-2.2.11.Final.jar --> same as above
                            • jboss-remoting.jar --> you need remoting to other non as7 jboss as?
                            • jbosssx-server.jar  --> same as above
                            • junit-4.7.jar --> junit is compile time dep not runtime
                            • junit-dep-4.7.jar --> same as above
                            • persistence.jar --> this is jpa api, this is part of app server no need to bundle
                            • quartz-jboss-1.6.0.jar --> use just one if you need quartz no need for two
                            • quartz-1.6.0.jar --> same as above
                            • servlet-api-2.4.jar --> this is standard api that is allready part of app server no need to bundle it
                            • xmlParserAPIs-2.6.1.jar --> no need to bundle it unless you rally need some special features from this one

                             

                             

                            As for hibernate and hibernate search goes, you have hibernate 3 and 4 + hibernate search 3 and 4

                            as hibernate 4 is part of AS7 you do not need it, hibernate3 is probably a leftover

                             

                            this would be for start, lets go on from here...

                             

                            --

                            tomaz

                            • 11. Re: Migration from jboss 5 to jboss 7
                              rajivtmathew

                              Thanks for the prompt feedback.

                               

                              You said: "First thing that looks wrong is that you have "lib" jars in root of ear, this was changed in ee6 spec that it has to be in a folder (which folder is configurable in application.xml) by default in lib.

                              so i would recomend you to move all jars that are not deployable (not explicitly defined in application.xml) to lib folder."

                               

                              >> Does that mean moving it out of myapp.ear folder, into the parent folder (i.e. deployments)?  Didn't quite follow that part.

                              • 12. Re: Migration from jboss 5 to jboss 7
                                ctomc

                                hi,

                                 

                                not up, down. in your case move them together with others in your app.ear/lib

                                 

                                --

                                tomaz

                                • 13. Re: Migration from jboss 5 to jboss 7
                                  rajivtmathew

                                  I followed the steps mentioned, and have clearly demarcated the deployable jars in myapp.ear folder, and non-deployable ones under myapp.ear/lib. I've merged in some more new code, and tried to start JBoss-as-7 server. It still hangs once it gets to the point of attempting to deploy myapp.ear. By this point, all my hornetQ topics/queues have been set up, as well as my MDBs. Still puzzled trying to figure out what could be the problem here.

                                  • 14. Re: Migration from jboss 5 to jboss 7
                                    ozizka

                                    As a side note: There's an automatic JBoss AS configration migration tool underway: https://github.com/OndraZizka/jboss-migration/wiki

                                    Already helps with certain parts of the configuration.

                                    Doesn't cover application migration.