1 2 Previous Next 15 Replies Latest reply on Apr 17, 2009 9:27 AM by Daniel Holesinsky

    Deployment order causes problem with JBoss 5 CR2

    John smith Newbie

      Hello,

      I have a sample application with an EJB3 SLSB which is being injected by another jar file as follows :

      1st Bean called A.jar:

      package com.mypkg.repository.session;

      import javax.ejb.EJB;
      import javax.ejb.Stateless;
      import com.jboss.sample.SampleEJBLocal;


      @Stateless (name="StatelessManageUser", mappedName="manageUserMappedName")
      public class manageUserBean implements manageUserRemote,manageUser {

      @EJB
      SampleEJBLocal mysample;

      public void SayHello(){
      mysample.ShowHelloLocal("Hello Local");
      }

      public void SayHelloRemote() {

      mysample.ShowHelloLocal("Hello Remote");
      }

      }

      my Other Bean is as follows :

      2nd Bean called B.jar :

      package com.jboss.sample;

      import javax.ejb.Stateless;

      /**
      * Session Bean implementation class MySampleEJB
      */
      @Stateless(name="MySampleEJB", mappedName = "SampleEJBMappedName")
      public class MySampleEJB implements SampleEJBRemote, SampleEJBLocal {

      public void ShowHelloLocal(String message) {

      System.out.println("Hello every body_local !");
      }

      public void ShowHolloRemote(String message) {

      System.out.println("Hello every body_remote !" + message);

      }

      }


      The application is deployed as an EAR file in the following structure:

      testAB.ear
      |
      |--- META-INF
      | |
      | |----application.xml
      | |

      |--- A.jar (inject SLSB B.jar)
      | |
      | |--- META-INF
      | | |MANIFEST.MF
      | | |
      |
      |
      |
      |--- B.jar (contains the SLSB)
      | |
      | |
      | |--- META-INF
      | |
      | |



      I have the folowing error when i try to deploy my testAB.ear with JBoss 5 CR2,

      Part of the exception is pasted below:

      ...
      Caused by: java.lang.NullPointerException
      at org.jboss.ejb3.javaee.JavaEEComponentHelper.createObjectName(JavaEEComponentHelper.java:46)
      at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:167)
      at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:431)
      at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1389)
      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.processAnnotations(InjectionUtil.java:197)
      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:572)
      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:439)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:552)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:202)
      ... 28 more
      2008-12-04 17:17:39,392 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Real: name=vfszip:/product/jboss/jboss-5.0.0.CR2/server/default/deploy/testAB.ear state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying A.jar: null
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:209)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:108)
      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:169)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1056)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      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:627)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
      at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.NullPointerException
      at org.jboss.ejb3.javaee.JavaEEComponentHelper.createObjectName(JavaEEComponentHelper.java:46)
      at org.jboss.ejb3.deployers.JBoss5DeploymentScope.getEjbContainer(JBoss5DeploymentScope.java:167)
      at org.jboss.ejb3.Ejb3Deployment.getEjbContainer(Ejb3Deployment.java:431)
      at org.jboss.ejb3.EJBContainer.resolveEjbContainer(EJBContainer.java:1389)
      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.processAnnotations(InjectionUtil.java:197)
      at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:572)
      at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:439)
      at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:552)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:202)
      ... 28 more
      2008-12-04 17:17:39,393 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderDomain] ClassLoaderDomain@15b0e2c{DefaultDomain} unregisterClassLoader BaseClassLoader@2c1f9d{vfszip:/product/jboss/jboss-5.0.0.CR2/server/default/deploy/testAB.ear}
      2008-12-04 17:17:39,393 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] UnifiedLoaderRepository removed(false) null
      2008-12-04 17:17:39,393 DEBUG [org.jboss.classloader.spi.base.BaseClassLoaderPolicy] VFSClassLoaderPolicy@cf9105{vfszip:/product/jboss/jboss-5.0.0.CR2/server/default/deploy/testAB.ear} shutdown!
      2008-12-04 17:17:39,393 DEBUG [org.jboss.classloader.spi.base.BaseClassLoader] BaseClassLoader@2c1f9d{vfszip:/product/jboss/jboss-5.0.0.CR2/server/default/deploy/testAB.ear} shutdown!
      2008-12-04 17:17:39,393 DEBUG [org.jboss.classloading.spi.dependency.Domain] org.jboss.classloading.spi.dependency.Domain@120540c{DefaultDomain} add module VFSDeploymentClassLoaderPolicyModule testAB.ear:0.0.0
      2008-12-04 17:17:39,393 DEBUG [org.jboss.deployers.vfs.plugins.classloader.InMemoryClassesDeployer] Removing dynamic class root for vfszip:/product/jboss/jboss-5.0.0.CR2/server/default/deploy/testAB.ear
      2008-12-04 17:17:39,393 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      and when i just rename A become B and B become A, the deployment is successful !

      I deduced that there's an alphabetical order deployment !

      is this a Bug ? if it's the case, should i open a bug in JIRA?


      Thank you for your response.
      Thank's a lot.

        1 2 Previous Next