5 Replies Latest reply on Dec 9, 2011 1:42 PM by H B

    EAR deployment failure while trying to migrate from JBOSS 5.1 to 7.10 beta

    H B Newbie

      Hi,

      I have a EAR which runs fine in JBOSS 5.1. Now I'm trying to migrate it to jboss 7.10.The ear-file contains a JCA rar and a EJB jar. EJB references the resource in rar file. I added the configuration for resource adapter in standalone.xml after converting *-ds.xml file using ironjacamar. Howerver, I got following error after starting jboss 7.10:

      10:39:11,860 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
            service jboss.naming.context.java.jboss.resources.PHSAdapterRef (missing) dependents: [service jboss.naming.context.java.comp.powerhubjee.powerhubjee-ejb.UtilityEJB.env.PHSAdapterRef]

      10:39:11,860 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.comp.powerhubjee.powerhubjee-

      ejb.UtilityEJB.env.PHSAdapterRefjboss.naming.context.java.jboss.resources.PHSAdapterRefMissing[jboss.naming.context.java.comp.powerhubjee.powerhubjee-ejb.UtilityEJB.env.PHSAdapterRefjboss.naming.context.java.jboss.resources.PHSAdapterRef]"]}}}

       

      My resource adapter in standardalone.xml:

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

        <resource-adapters>

           <resource-adapter>

             <archive> powerhubjee.ear#powerhubjee-ra.rar</archive>

         <connection-definitions>

          <connection-definition class-name="com.lgc.dam.phs.server.jee.common.PHSConnectionFactory" jndi-name="jca/PHSAdapter" enabled="true" >

          <config-property name="settingsFilePath" type="java.lang.String">pe_dic.props</config-property>    

           </connection-definition>

         </connection-definitions>

        </resource-adapter>

      </resource-adapters>

      </subsystem>

       

      I have attached jboss.xml and ejb-jar.xml.

       

      Is there anything I missed during migration process?

       

      Thanks!

        • 2. Re: EAR deployment failure while trying to migrate from JBOSS 5.1 to 7.10 beta
          Jesper Pedersen Master

          Btw, the best practice is to include an META-INF/ironjacamar.xml file in your .rar with the configuration - unless you really want the configuration in the resource adapters subsystem.

          • 3. Re: EAR deployment failure while trying to migrate from JBOSS 5.1 to 7.10 beta
            H B Newbie

            Hi Jesper, Thanks for the help!

            I tried it with the latest jboss build (#156). Still failed. I have noticed a few things:

            (1) Got following message:

            12:36:11,498 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.module.service."deployment.powerhubjee.ear.lib/com_lgc_ph_sqlmapper.jar".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.powerhubjee.ear.lib/com_lgc_ph_sqlmapper.jar".main: Failed to load module: deployment.powerhubjee.ear.lib/com_lgc_ph_sqlmapper.jar:main

            at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:67) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

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

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

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

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

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

            Caused by: org.jboss.modules.ModuleLoadException: Timeout waiting for module service: deployment.powerhubjee.ear.lib/com_lgc_hsf.jar:main

            at org.jboss.as.server.moduleservice.ServiceModuleLoader$ModuleSpecLoadListener.getModuleSpec(ServiceModuleLoader.java:132) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

            at org.jboss.as.server.moduleservice.ServiceModuleLoader.findModule(ServiceModuleLoader.java:172) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

            at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:265)

            at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:212)

            at org.jboss.as.server.moduleservice.ServiceModuleLoader.preloadModule(ServiceModuleLoader.java:157) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

            at org.jboss.modules.Module.addExportedPaths(Module.java:869)

            at org.jboss.modules.Module.addPaths(Module.java:810)

            at org.jboss.modules.Module.link(Module.java:997)

            at org.jboss.modules.Module.relinkIfNecessary(Module.java:1023)

            at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:198)

            at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:63) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

            ... 5 more

             

            Not sure why it is looking for main for those two library files.

             

            (2) After removing those two libraries to see what will happen, I got following error:

            14:29:18,388 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.ra.deployment."powerhubjee.ear#powerhubjee-ra_1": org.jboss.msc.service.StartException in service jboss.ra.deployment."powerhubjee.ear#powerhubjee-ra_1": org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [powerhubjee.ear#powerhubjee-ra]
            at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:122)
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [:1.6.0_07]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [:1.6.0_07]
            at java.lang.Thread.run(Thread.java:619) [:1.6.0_07]
            Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS010446: Failed to start RA deployment [powerhubjee.ear#powerhubjee-ra]
            at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:107)
            ... 5 more
            Caused by: org.jboss.jca.deployers.common.DeployException: com.lgc.dam.phs.server.jee.ra.PHSManagedConnectionFactoryImpl not a valid connection definition
            at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.findConnectionDefinitions(AbstractResourceAdapterDeployer.java:472)
            at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1571)
            at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService$AS7RaXmlDeployer.doDeploy(ResourceAdapterXmlDeploymentService.java:165)
            at org.jboss.as.connector.metadata.deployment.ResourceAdapterXmlDeploymentService.start(ResourceAdapterXmlDeploymentService.java:102)
            ... 5 more

            PHSManagedConnectionFactoryImpl implements ResourceAdapter.

            • 4. Re: EAR deployment failure while trying to migrate from JBOSS 5.1 to 7.10 beta
              Jesper Pedersen Master

              "main" is just the slot identifier - where do you have those libraries ? How is your .ear structured ?

               

              Caused by: org.jboss.jca.deployers.common.DeployException: com.lgc.dam.phs.server.jee.ra.PHSManagedConnectionFactoryImpl not a valid connection definition

               

              Looks like your <resource-adapter> definition isn't correct - try http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/tools.html#tools_rarinfo from the IronJacamar 1.1.0.Alpha4 distribution on the .rar file in order to get a sample deployment descriptor -- remember to add "earName#rarName" for the <archive> value.

              • 5. Re: EAR deployment failure while trying to migrate from JBOSS 5.1 to 7.10 beta
                H B Newbie

                Fixed both issues and now my JCA bagan to deploy. However, during the deployment, I got following error:

                 

                ....

                18:29:27,757 INFO [stdout] (MSC service thread 1-2) com.pgs.dm.slegge.server.plugins.serveradmin.serverlist.ServerInfoTopic : 0 OK, 0 failed

                18:29:27,757 INFO [stdout] (MSC service thread 1-2) com.pgs.dm.slegge.server.dbdictionary.DbDictionaryInitializer

                18:29:30,954 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "powerhubjee.ear" was rolled back with failure message Operation cancelled

                18:29:30,955 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "powerhubjee.ear")]): java.util.concurrent.CancellationException: Operation cancelled asynchronously

                at org.jboss.as.controller.OperationContextImpl.awaitContainerMonitor(OperationContextImpl.java:360) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.OperationContextImpl.releaseStepLocks(OperationContextImpl.java:603) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:574) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                ...

                 

                18:31:11,140 INFO [com.lgc.dam.phs.server.jee.ra.PHSManagedConnectionFactoryImpl] (MSC service thread 1-2) ************************* Initialising Factory FINISHED *********************

                18:31:11,141 INFO [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-2) IJ020002: Deployed: file:/ph_net_install/jboss-as-7.1.0.CR1-SNAPSHOT/standalone/tmp/vfs/deploymentaf9c7e7de9869169/powerhubjee-ra.rar-42c0ebc261e2bb11/contents/

                18:31:11,146 INFO [stdout] (MSC service thread 1-1) Shutting down: Resource Adapter shutdown

                18:31:11,183 INFO [stdout] (Grid Manager thread) -:user1402281195_0:0:172:-1845a09:13420397100:-7ffe:125+DSLM

                18:31:11,260 INFO [stdout] (MSC service thread 1-1) DbDictionaryInitializer: Closing dictionary connection(s)

                18:31:11,350 INFO [stdout] (MSC service thread 1-1) Shutdown complete. Exiting...

                18:31:11,468 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment powerhubjee-ra.rar in 99778ms

                18:31:11,479 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment powerhubjee-ejb.jar in 99789ms

                18:31:11,642 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) Stopped deployment powerhubjee.ear in 99960ms

                18:31:42,227 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.

                18:31:42,228 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "powerhubjee.ear")]): java.util.concurrent.CancellationException: Operation cancelled asynchronously

                at org.jboss.as.controller.OperationContextImpl.awaitContainerMonitor(OperationContextImpl.java:360) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.OperationContextImpl.getServiceRegistry(OperationContextImpl.java:211) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.server.deployment.DeploymentHandlerUtil$1.execute(DeploymentHandlerUtil.java:98) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:321) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:216) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:152) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.server.deployment.DeploymentDeployHandler.execute(DeploymentDeployHandler.java:68) [jboss-as-server-7.1.0.CR1-SNAPSHOT.jar:]

                at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:321) [jboss-as-controller-7.1.0.CR1-SNAPSHOT.jar:]

                ...

                 

                My rar is a java process which reads metadata during the initialization (it could take sometime to finish).