8 Replies Latest reply on Jul 11, 2013 2:00 PM by rohith pavithran

    Migrating weblogic ejb2.x application to eap 5

    rohith pavithran Newbie

      We are migrating a product which was developed in Weblogic 8.1.X to JBoss EAP5.X.

      1. As this product was there in for a long time code update is considered as a last apporach, which version in eap  should we target as part migration? Currently we are checking with EAP5.

      2. In weblogic the application is deployed as an exploded ear. To migrate the ejb order jboss-app.xml was created, and added to the deployment.

       

      <?xml version="1.0" encoding="UTF-8"?>

       

      <jboss-app>

        <module-order>strict</module-order> 

      </jboss-app>

       

      If the above is added also the ejb order is not changing and its loading from A-Z.  How to make sure that the order is maintained in exploded mode.

        • 1. Re: Migrating weblogic ejb2.x application to eap 5
          jaikiran pai Master

          Rohith, welcome to the forums.

           

           

          rohith pavithran wrote:

           

          We are migrating a product which was developed in Weblogic 8.1.X to JBoss EAP5.X.

          1. As this product was there in for a long time code update is considered as a last apporach, which version in eap  should we target as part migration? Currently we are checking with EAP5.

          EAP6 is the latest version of JBoss EAP and is based on JBoss AS7 http://www.jboss.org/jbossas. I would recommend trying that version which in fact is available for download here http://www.jboss.org/jbossas/downloads. More about recent EAP developments can be found here:

           

          https://community.jboss.org/blogs/mark.little/2013/03/07/eap-binaries-available-for-all-developers

          http://www.jboss.org/jbossas/faq

          • 2. Re: Migrating weblogic ejb2.x application to eap 5
            rohith pavithran Newbie

            Hi jaikiran,

             

            I was trying the application in JBoss EAP 6.1 alpha. Found that on deployment was giving the below error

             

            09:52:44,931 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.subunit."XXX.ear"."XXXX.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."XXXX.ear"."XXXX.jar".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "XXXX.jar" of deployment "XXXX.ear"

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

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

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

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

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

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

            Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014185: Exception while parsing ejb-jar.xml: /content/XXXX.ear/XXXX.jar/META-INF/ejb-jar.xml

                at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.parseEjbJarXml(EjbJarParsingDeploymentUnitProcessor.java:249)

                at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.deploy(EjbJarParsingDeploymentUnitProcessor.java:120)

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

                ... 5 more

            Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[11,12]

            Message: Unexpected element 'acknowledge-mode' encountered

                at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109)

                at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElement(AbstractMetaDataParser.java:56)

                at org.jboss.metadata.ejb.parser.spec.AbstractNamedMetaDataWithDescriptionGroupParser.processElement(AbstractNamedMetaDataWithDescriptionGroupParser.java:67)

                at org.jboss.metadata.ejb.parser.spec.AbstractEnterpriseBeanMetaDataParser.processElement(AbstractEnterpriseBeanMetaDataParser.java:85)

                at org.jboss.metadata.ejb.parser.spec.AbstractMessageDrivenBeanParser.processElement(AbstractMessageDrivenBeanParser.java:94)

                at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.processElement(MessageDrivenBean31Parser.java:77)

                at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.processElement(MessageDrivenBean31Parser.java:37)

                at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:69)

                at org.jboss.metadata.ejb.parser.spec.MessageDrivenBean31Parser.parse(MessageDrivenBean31Parser.java:44)

                at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.processElement(EnterpriseBeansMetaDataParser.java:99)

                at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.processElement(EnterpriseBeansMetaDataParser.java:40)

                at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:69)

                at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.parse(EnterpriseBeansMetaDataParser.java:75)

                at org.jboss.metadata.ejb.parser.spec.EnterpriseBeansMetaDataParser.parse(EnterpriseBeansMetaDataParser.java:68)

                at org.jboss.metadata.ejb.parser.spec.AbstractEjbJarMetaDataParser.processElement(AbstractEjbJarMetaDataParser.java:112)

                at org.jboss.metadata.ejb.parser.spec.AbstractEjbJarMetaDataParser.processElement(AbstractEjbJarMetaDataParser.java:39)

                at org.jboss.metadata.ejb.parser.spec.AbstractMetaDataParser.processElements(AbstractMetaDataParser.java:69)

                at org.jboss.metadata.ejb.parser.spec.EjbJarMetaDataParser.parseDocument(EjbJarMetaDataParser.java:110)

                at org.jboss.metadata.ejb.parser.spec.EjbJarMetaDataParser.parse(EjbJarMetaDataParser.java:54)

                at org.jboss.as.ejb3.deployment.processors.EjbJarParsingDeploymentUnitProcessor.parseEjbJarXml(EjbJarParsingDeploymentUnitProcessor.java:246)

                ... 7 more

            Found a defect on same line's in https://issues.jboss.org/browse/JBMETA-349, in below link which mentions that the "Currently EJB 2.0 deployments are not supported"

            https://issues.jboss.org/browse/JBMETA-349?focusedCommentId=12671938&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12671938

             

            So what should be approach taken to resolve the same?

            • 3. Re: Migrating weblogic ejb2.x application to eap 5
              Stephen Coy Master

              Hi Rohith,

               

              You will need to upgrade your ejb deployment descriptors to at least 2.1 (and preferably 3.1) in order to move forward.

               

              Additionally, if your code contains CMP entity beans then migrating these could be a huge task (depending upon how many there are).

              • 4. Re: Migrating weblogic ejb2.x application to eap 5
                rohith pavithran Newbie

                The code heavily uses cmp based bean's, is there tool available for conversion.

                • 5. Re: Migrating weblogic ejb2.x application to eap 5
                  Wolf-Dieter Fink Master

                  migrate CMP to JPA might be favourable as EJB2 iwill be optional with the next EJB spec.

                   

                  I did not found toos in my case for migration, we have written a bit sed awk for that to migrate XDoclet annotations to JPA annotations, but there was still a bit manual work.

                  Another option might be to use a code generator which analyse the DB schema and produce the JPA classes.

                  • 6. Re: Migrating weblogic ejb2.x application to eap 5
                    rohith pavithran Newbie

                    The migration of application to JBoss EAP 5.1.2 was completed successfully (the configurations where migrated using xslt transformations).

                    • 7. Re: Migrating weblogic ejb2.x application to eap 5
                      Jijo Mathew Newbie

                      Hi Rohith,

                       

                      Could you provide little more details on how the xslt tranformations worked for the migration?  Actually we need to migrate a product (EJB 2.1) from Websphere 6.0 to JBoss EAP 5.1.2. Its heavily using CMP Entity Beans.  So it could be very helpful if you provide some details or sample code ?

                       

                      Thanks

                      Jijo

                      • 8. Re: Migrating weblogic ejb2.x application to eap 5
                        rohith pavithran Newbie

                        xlst transformations where used to update the specific xml configurations from weblogic to jboss. For xslt transformation sample please rerfer below link

                         

                        https://community.jboss.org/wiki/PortingFromWeblogic

                         

                        Please find the below link which I found might be usefull

                         

                        http://fhornain.wordpress.com/2013/06/12/jboss-how-to-migrate-applications-based-on-ibm-websphereoracle-weblogic-to-jboss-eapwildfly/