2 Replies Latest reply on May 22, 2014 5:30 AM by Solange Delageniere

    Problem migrating ear from jboss6 to Wildfly

    Solange Delageniere Newbie

      Hello,

       

      I migrated my ejb3 application from jboss6 to Wildfly. The application is packaged in a ear which contain a jar and a war.

      I still face the same runtime error :

      [

      10:54:43,893 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016002: Processing weld deployment ispyb.ear

      10:54:43,921 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.subunit."ispyb.ear"."ispyb-ejb3.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ispyb.ear"."ispyb-ejb3.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of subdeployment "ispyb-ejb3.jar" of deployment "ispyb.ear"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_45]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_45]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_45]

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class ispyb.server.data.ejb3.daos.collections.GridInfo3DAOBean with ClassLoader ModuleClassLoader for Module "deployment.ispyb.ear.ispyb-ejb3.jar:main" from Service Module Loader

          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

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

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

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

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

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.0.0.Final.jar:8.0.0.Final]

          ... 5 more

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/criterion/Criterion

      ]

       

      I understand that the hibernate jar is missing, but it is located in the jboss modules and I tried to add the dependencies in the jboss-deployment-structure.xml under diffrent ways, but none is working.

       

      for example :

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"> 

          <ear-subdeployments-isolated>false</ear-subdeployments-isolated> 

          <deployment>

              <dependencies>

                  <module name="org.hibernate"/>

              </dependencies>

          </deployment>

      </jboss-deployment-structure> 

       

      or

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"> 

          <ear-subdeployments-isolated>false</ear-subdeployments-isolated> 

          <deployment>

              <dependencies>

                  <module name="org.hibernate"/>

              </dependencies>

          </deployment>

       

           <sub-deployment name="ispyb-ejb3.jar"> 

                      <dependencies> 

                          <system> 

                              <module name="org.hibernate"/>

                          </system> 

                      </dependencies> 

           

         </sub-deployment> 

      </jboss-deployment-structure> 

       

      Could you please help me ?

       

      Thanks in advance,

       

      Solange

        • 1. Re: Problem migrating ear from jboss6 to Wildfly
          Tomaz Cerar Master

          Hi,

           

          can you show us structure of your ear, especialy what you have in EAR/lib and *.war/WEB-INF/lib

          • 2. Re: Problem migrating ear from jboss6 to Wildfly
            Solange Delageniere Newbie

            Hi,

             

            Thank you for your answer.

            Finally I found the correct writing for the jboss-deployment-structure, "export=true" was missing.

             

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

            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"> 

                <ear-subdeployments-isolated>false</ear-subdeployments-isolated> 

                <deployment>

                    <dependencies>

                               <module name="org.hibernate" export="true"/> 

                               <module name="com.sun.xml.bind" export="true"/> 

                               <module name="org.apache.httpcomponents" export="true"/> 

                               <module name="org.apache.commons.beanutils" export="true"/> 

                               <module name="org.jboss.security.xacml" export="true"/>

                               <module name="org.jboss.security.negotiation" export="true"/> 

                    </dependencies>

                </deployment>    

            </jboss-deployment-structure> 

             

            But I wonder if our packaging is correct : we have nothing in EAR/lib, and we have all jars in .war/WEB-INF/lib.

            Is that the correct way ?

             

            Thanks,

             

            Solange