6 Replies Latest reply on Feb 14, 2011 3:11 AM by jaikiran

    Problem with EAR deployment in JBoss 5.1.0CR1

    getaceres

      I'm using JBoss 5.1.0CR1 and I'm trying to deploy an EAR file which contains the following:

      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
       <display-name>OHAServices</display-name>
       <module>
       <ejb>datasource-common-1.0-SNAPSHOT.jar</ejb>
       </module>
       <module>
       <ejb>datasource-ws-1.0-SNAPSHOT.jar</ejb>
       </module>
       <module>
       <ejb>OHA-local-backend-1.0-SNAPSHOT.jar</ejb>
       </module>
       <module>
       <ejb>OHA-provisioning-service-1.0-SNAPSHOT.jar</ejb>
       </module>
      </application>


      They are in order of dependencies, as all the jars depend on datasource-common but also it's the first alphabetically so it must be deployed first. However, on deployment I see this:

      18:59:11,912 INFO [JBossASKernel] Created KernelDeployment for: OHA-local-backend-1.0-SNAPSHOT.jar
      18:59:11,913 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=OHA-local-backend-1.0-SNAPSHOT.jar,name=LocalDataSource,service=EJB3
      18:59:11,913 INFO [JBossASKernel] with dependencies:
      18:59:11,913 INFO [JBossASKernel] and demands:
      18:59:11,913 INFO [JBossASKernel] persistence.unit:unitName=OHAServices-1.0-SNAPSHOT.ear/OHA-local-backend-1.0-SNAPSHOT.jar#DocumentPersistenceJTA
      18:59:11,913 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
      18:59:11,913 INFO [JBossASKernel] and supplies:
      18:59:11,913 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/LocalDataSource/remote-com.andago.healthassistant.datasource.local.LocalDatasourceRemote
      18:59:11,914 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/LocalDataSource/local
      18:59:11,914 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.local.LocalDataSourceLocal
      18:59:11,914 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.local.LocalDatasourceRemote
      18:59:11,914 INFO [JBossASKernel] jndi:LocalDataSourceRemote
      18:59:11,914 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/LocalDataSource/local-com.andago.healthassistant.datasource.local.LocalDataSourceLocal
      18:59:11,914 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=OHA-local-backend-1.0-SNAPSHOT.jar,name=LocalDataSource,service=EJB3) to KernelDeployment of: OHA-local-backend-1.0-SNAPSHOT.jar
      18:59:11,995 INFO [JBossASKernel] Created KernelDeployment for: OHA-provisioning-service-1.0-SNAPSHOT.jar
      18:59:11,995 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=OHA-provisioning-service-1.0-SNAPSHOT.jar,name=RelationsService,service=EJB3
      18:59:11,995 INFO [JBossASKernel] with dependencies:
      18:59:11,996 INFO [JBossASKernel] and demands:
      18:59:11,996 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
      18:59:11,996 INFO [JBossASKernel] persistence.unit:unitName=OHAServices-1.0-SNAPSHOT.ear/OHA-provisioning-service-1.0-SNAPSHOT.jar#PatientCareRelationPersistenceJTA
      18:59:11,996 INFO [JBossASKernel] and supplies:
      18:59:11,996 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/RelationsService/local
      18:59:11,996 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/RelationsService/local-com.andago.healthassistant.provisioning.service.RelationServiceLocal
      18:59:11,996 INFO [JBossASKernel] Class:com.andago.healthassistant.provisioning.service.RelationServiceLocal
      18:59:11,996 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/RelationsService/remote
      18:59:11,996 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=OHA-provisioning-service-1.0-SNAPSHOT.jar,name=RelationsService,service=EJB3) to KernelDeployment of: OHA-provisioning-service-1.0-SNAPSHOT.jar
      18:59:12,039 INFO [JBossASKernel] Created KernelDeployment for: datasource-common-1.0-SNAPSHOT.jar
      18:59:12,039 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=datasource-common-1.0-SNAPSHOT.jar,name=DataSourceFinderBean,service=EJB3
      18:59:12,039 INFO [JBossASKernel] with dependencies:
      18:59:12,039 INFO [JBossASKernel] and demands:
      18:59:12,039 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
      18:59:12,040 INFO [JBossASKernel] persistence.unit:unitName=OHAServices-1.0-SNAPSHOT.ear/datasource-common-1.0-SNAPSHOT.jar#DataSourcePersistenceUnit
      18:59:12,040 INFO [JBossASKernel] and supplies:
      18:59:12,040 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/local-com.andago.healthassistant.datasource.finder.DataSourceFinderLocal
      18:59:12,040 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/local
      18:59:12,040 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.finder.DataSourceFinderLocal
      18:59:12,040 INFO [JBossASKernel] jndi:DataSourceFinderBean
      18:59:12,040 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.finder.DataSourceFinderRemote
      18:59:12,040 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/remote-com.andago.healthassistant.datasource.finder.DataSourceFinderRemote
      18:59:12,040 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=datasource-common-1.0-SNAPSHOT.jar,name=DataSourceFinderBean,service=EJB3) to KernelDeployment of: datasource-common-1.0-SNAPSHOT.jar
      18:59:12,349 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/jsanchez/apps/jboss/jboss-5.1.0.CR1/server/default/deploy/OHA/OHAServices-1.0-SNAPSHOT.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying datasource-ws-1.0-SNAPSHOT.jar: JBAS-5713: could not find an ejb3 deployment for datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
       at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
       at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
       at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
       at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
       at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
       at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
       at org.jboss.Main.boot(Main.java:216)
       at org.jboss.Main$1.run(Main.java:546)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: JBAS-5713: could not find an ejb3 deployment for datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
       at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:173)
       at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:410)
       at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1418)
       at org.jboss.injection.AbstractHandler.addDependency(AbstractHandler.java:50)
       at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:146)
       at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:393)
       at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:160)
       at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:166)
       at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:197)
       at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:609)
       at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:418)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:526)
       at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
       ... 34 more
      18:59:12,417 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      DEPLOYMENTS IN ERROR:
       Deployment "vfszip:/home/jsanchez/apps/jboss/jboss-5.1.0.CR1/server/default/deploy/OHA/OHAServices-1.0-SNAPSHOT.ear/" is in error due to the following reason(s): java.lang.IllegalStateException: JBAS-5713: could not find an ejb3 deployment for datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
      


      I go to JBAS-5713 issue in Jira but it seems to be fixed, so either, it's not fixed or it's not the same bug.

        • 1. Re: Problem with EAR deployment in JBoss 5.1.0CR1
          jaikiran

           

          "getaceres" wrote:

          <?xml version="1.0" encoding="UTF-8"?>
          <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
           <display-name>OHAServices</display-name>
           <module>
           <ejb>datasource-common-1.0-SNAPSHOT.jar</ejb>
           </module>
           <module>
           <ejb>datasource-ws-1.0-SNAPSHOT.jar</ejb>
           </module>
           <module>
           <ejb>OHA-local-backend-1.0-SNAPSHOT.jar</ejb>
           </module>
           <module>
           <ejb>OHA-provisioning-service-1.0-SNAPSHOT.jar</ejb>
           </module>
          </application>


          They are in order of dependencies, as all the jars depend on datasource-common but also it's the first alphabetically so it must be deployed first.

          They are not ordered alphabetically :) 'O' comes before 'd' http://www.kerryr.net/pioneers/ascii2.htm so OHA-* jar files are being picked up first, before the datasource-common jar. Try renaming them appropriately.


          I go to JBAS-5713 issue in Jira but it seems to be fixed, so either, it's not fixed or it's not the same bug.

          Unfortuantely, deployment ordering is still an issue and is being worked on.

          • 2. Re: Problem with EAR deployment in JBoss 5.1.0CR1
            getaceres

            Well, so, Is there a way to force a specific deployment order for the jars appart from renaming them? In JBoss 4 there was an option in jboss.xml but it seems to be deprecated.
            If not, is there a way to specify dependencies among EJBs so JBoss 5 deploys them in the correct order?

            • 3. Re: Problem with EAR deployment in JBoss 5.1.0CR1
              getaceres

              I've renamed the jars and now it looks like this:

              <?xml version="1.0" encoding="UTF-8"?>
              <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
               <display-name>OHAServices</display-name>
               <module>
               <ejb>oha-datasource-common-1.0-SNAPSHOT.jar</ejb>
               </module>
               <module>
               <ejb>oha-datasource-ws-1.0-SNAPSHOT.jar</ejb>
               </module>
               <module>
               <ejb>oha-local-backend-1.0-SNAPSHOT.jar</ejb>
               </module>
               <module>
               <ejb>oha-provisioning-service-1.0-SNAPSHOT.jar</ejb>
               </module>
              </application>
              


              But I'm having the same exception:

              17:02:59,475 INFO [JBossASKernel] Created KernelDeployment for: oha-datasource-common-1.0-SNAPSHOT.jar
              17:02:59,475 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=oha-datasource-common-1.0-SNAPSHOT.jar,name=DataSourceFinderBean,service=EJB3
              17:02:59,475 INFO [JBossASKernel] with dependencies:
              17:02:59,475 INFO [JBossASKernel] and demands:
              17:02:59,476 INFO [JBossASKernel] persistence.unit:unitName=OHAServices-1.0-SNAPSHOT.ear/oha-datasource-common-1.0-SNAPSHOT.jar#DataSourcePersistenceUnit
              17:02:59,476 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
              17:02:59,476 INFO [JBossASKernel] and supplies:
              17:02:59,476 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/local-com.andago.healthassistant.datasource.finder.DataSourceFinderLocal
              17:02:59,476 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/local
              17:02:59,476 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.finder.DataSourceFinderLocal
              17:02:59,476 INFO [JBossASKernel] jndi:DataSourceFinderBean
              17:02:59,476 INFO [JBossASKernel] Class:com.andago.healthassistant.datasource.finder.DataSourceFinderRemote
              17:02:59,476 INFO [JBossASKernel] jndi:OHAServices-1.0-SNAPSHOT/DataSourceFinderBean/remote-com.andago.healthassistant.datasource.finder.DataSourceFinderRemote
              17:02:59,477 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=OHAServices-1.0-SNAPSHOT.ear,jar=oha-datasource-common-1.0-SNAPSHOT.jar,name=DataSourceFinderBean,service=EJB3) to KernelDeployment of: oha-datasource-common-1.0-SNAPSHOT.jar
              17:02:59,774 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/jsanchez/apps/jboss/jboss-5.1.0.CR1/server/default/deploy/OHA/OHAServices-1.0-SNAPSHOT.ear/ state=PreReal mode=Manual requiredState=Real
              org.jboss.deployers.spi.DeploymentException: Error deploying oha-datasource-ws-1.0-SNAPSHOT.jar: JBAS-5713: could not find an ejb3 deployment for oha-datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
               at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
               at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
               at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
               at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
               at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
               at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
               at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
               at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
               at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
               at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
               at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
               at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
               at org.jboss.Main.boot(Main.java:216)
               at org.jboss.Main$1.run(Main.java:546)
               at java.lang.Thread.run(Thread.java:619)
              Caused by: java.lang.IllegalStateException: JBAS-5713: could not find an ejb3 deployment for oha-datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
               at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:173)
               at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:410)
               at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1418)
               at org.jboss.injection.AbstractHandler.addDependency(AbstractHandler.java:50)
               at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:146)
               at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:393)
               at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:160)
               at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:166)
               at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:197)
               at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:609)
               at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:418)
               at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:526)
               at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:189)
               ... 34 more
              17:02:59,844 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
              
              DEPLOYMENTS IN ERROR:
               Deployment "vfszip:/home/jsanchez/apps/jboss/jboss-5.1.0.CR1/server/default/deploy/OHA/OHAServices-1.0-SNAPSHOT.ear/" is in error due to the following reason(s): java.lang.IllegalStateException: JBAS-5713: could not find an ejb3 deployment for oha-datasource-common-1.0-SNAPSHOT.jar (yet), try reordering the jars or adding explicit dependencies
              
              17:02:59,852 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
              17:02:59,893 INFO [AjpProtocol] Arrancando Coyote AJP/1.3 en ajp-127.0.0.1-8009
              17:02:59,900 INFO [ServerImpl] JBoss (Microcontainer) [5.1.0.CR1 (build: SVNTag=JBoss_5_1_0_CR1 date=200904290912)] Started in 38s:250ms
              


              • 4. Re: Problem with EAR deployment in JBoss 5.1.0CR1
                jaikiran

                 

                at org.jboss.injection.EJBRemoteHandler.ejbRefDependency(EJBRemoteHandler.java:146)
                at org.jboss.injection.EJBRemoteHandler.handleFieldAnnotations(EJBRemoteHandler.java:393)
                at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:160)


                I guess you are using @EJB injection inside a bean which belongs to a different jar. As a workaround, specify the mappedName attribute which points to the JNDI name of the other bean:

                // assuming DataSourceFinderBean is the jndi name of the remote interface of the
                // bean
                @EJB (mappedName="DataSourceFinderBean")
                private DataSourceFinderRemote bean;


                • 5. Problem with EAR deployment in JBoss 5.1.0CR1
                  asookazian

                  I'm having the same problem with upgrading from 4.2.2.GA to 5.1.0.GA.  What is the final answer (recommendation) for this problem?  renaming did not seem to work for the original poster.

                   

                  Must we actually change the @EJB code injections by adding mappedName attribute?  What happened to the jboss.xml config from 4.x?

                  • 6. Problem with EAR deployment in JBoss 5.1.0CR1
                    jaikiran

                    Arbi, can you please open a separate thread with the details. I'm not too sure what the issue is with your deployment. A separate thread will help avoid any confusion.