2 Replies Latest reply on Nov 9, 2011 10:25 AM by Everton Bianchini

    EJB3 standalone module deployment error

    Everton Bianchini Newbie

      Hi all!

       

      I have two EJB3 modules that must be deployed as standalone modules.

       

      My Business module have dependencies on DAO module, so I've separated the interfaces (local and remote) into two api jars, like:

       

      ePublicDAO.jar -> EJB implementations

      ePublicDAO-api.jar -> Local and Remote interfaces

      ePublicBusiness.jar -> EJB implementations

      ePublicBusiness-api.jar -> Local and Remote interfaces

       

      I copied ePublicDAO-api.jar and ePublicBusiness-api.jar to server/default/lib and deployed ePublicDAO.jar. Everything went ok and ePublicDAO.jar was deployed perfectly (apparently).

       

      Then I tried to deploy ePublicBusiness.jar and JBoss didn't deployed it with the following stacktrace:

       

      2011-11-08 14:44:32,779 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Real: name=vfs:///opt/javatools/jboss-6.0.0/server/default/deploy/ePublicBusiness.jar state=PreReal mode=Manual requiredState=Real: org.jboss.deployers.spi.DeploymentException: Error during deploy: org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.UnidadeCentroCustoBusiness

          at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:185) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]

          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]

          at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]

          at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]

          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]

          at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]

          at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]

          at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]

          at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]

          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]

          at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]

          at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_24]

          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_24]

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_24]

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_24]

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_24]

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

      Caused by: java.lang.RuntimeException: Could not resolve @EJB reference: [EJB Reference: beanInterface 'br.com.prescon.epublic.dao.UnidadeCentroCustoDAORemote', beanName 'null', mappedName 'null', lookupName 'null', owning unit 'ComponentDeploymentContext@322802193{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.UnidadeCentroCustoBusiness}'] for environment entry: env/br.com.prescon.epublic.business.UnidadeCentroCustoBusiness/unidadeCentroCustoDAO in unit ComponentDeploymentContext@322802193{org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData.UnidadeCentroCustoBusiness}

          at org.jboss.ejb3.jndi.deployers.resource.provider.AnnotatedEJBRefResourceProvider.provide(AnnotatedEJBRefResourceProvider.java:99) [:0.1.7]

          at org.jboss.ejb3.jndi.deployers.resource.provider.AnnotatedEJBRefResourceProvider.provide(AnnotatedEJBRefResourceProvider.java:50) [:0.1.7]

          at org.jboss.switchboard.mc.JndiEnvironmentProcessor.process(JndiEnvironmentProcessor.java:68) [:1.0.0-alpha-15]

          at org.jboss.switchboard.mc.deployer.AbstractSwitchBoardDeployer.process(AbstractSwitchBoardDeployer.java:119) [:1.0.0-alpha-15]

          at org.jboss.switchboard.mc.deployer.EJBEnvironmentSwitchBoardDeployer.internalDeploy(EJBEnvironmentSwitchBoardDeployer.java:87) [:1.0.0-alpha-15]

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]

          ... 38 more

       

      I've attached the entire server log.

       

      I'm using JBoss 6.0.0.

       

      I don't know what I'm doing wrong with JBoss (I have the same application deployed on Glassfish 3.1).

       

      I'd really appreciate some help.

       

      Thanks in advance.

        • 1. Re: EJB3 standalone module deployment error
          jaikiran pai Master

          Is there any bean implementation which exposes br.com.prescon.epublic.dao.UnidadeCentroCustoDAORemote as a business interface? What does it look like? Does the console log show that, that bean is being deployed?

          • 2. Re: EJB3 standalone module deployment error
            Everton Bianchini Newbie

            Yes, there is a bean implementing UnidadeCentroCustoDAORemote and it's located at ePublicDAO.jar.

             

            It's implementation (piece of it):

             

            @Stateless

            @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)

            @Interceptors(DatabaseExceptionInterceptor.class)

            public class UnidadeCentroCustoDAO implements UnidadeCentroCustoDAORemote, UnidadeCentroCustoDAOLocal {

                 ...

            }

             

            The console log shows that the bean UnidadeCentroCustoDAO was deployed correctly:

             

            2011-11-08 08:06:05,011 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) installing bean: jboss.j2ee:jar=ePublicDAO.jar,name=UnidadeCentroCustoDAO,service=EJB3

            2011-11-08 08:06:05,011 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)   with dependencies:

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)   and demands:

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jboss.ejb:service=EJBTimerService; Required: Described

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jboss-injector:topLevelUnit=ePublicDAO.jar,unit=ePublicDAO.jar,bean=UnidadeCentroCustoDAO; Required: Described

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     persistence.unit:unitName=ePublicDAO.jar#ePublic; Required: Described

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jboss-switchboard:appName=ePublicDAO,module=ePublicDAO,name=UnidadeCentroCustoDAO; Required: Create

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)   and supplies:

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jndi:UnidadeCentroCustoDAO/local

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     Class:br.com.prescon.epublic.dao.UnidadeCentroCustoDAORemote

            2011-11-08 08:06:05,012 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jndi:UnidadeCentroCustoDAO/local-br.com.prescon.epublic.dao.UnidadeCentroCustoDAOLocal

            2011-11-08 08:06:05,013 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jndi:UnidadeCentroCustoDAO

            2011-11-08 08:06:05,013 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     Class:br.com.prescon.epublic.dao.UnidadeCentroCustoDAOLocal

            2011-11-08 08:06:05,013 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jndi:UnidadeCentroCustoDAO/remote

            2011-11-08 08:06:05,013 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner)     jndi:UnidadeCentroCustoDAO/remote-br.com.prescon.epublic.dao.UnidadeCentroCustoDAORemote

            2011-11-08 08:06:05,013 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (HDScanner) Added bean(jboss.j2ee:jar=ePublicDAO.jar,name=UnidadeCentroCustoDAO,service=EJB3) to KernelDeployment of: ePublicDAO.jar

             

             

            and

             

            2011-11-08 08:18:52,755 WARN  [org.jboss.ejb3.TimerServiceContainer] (HDScanner) EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

            2011-11-08 08:18:52,764 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (HDScanner) Starting jboss.j2ee:jar=ePublicDAO.jar,name=UnidadeCentroCustoDAO,service=EJB3

            2011-11-08 08:18:52,764 INFO  [org.jboss.ejb3.EJBContainer] (HDScanner) STARTED EJB: br.com.prescon.epublic.dao.UnidadeCentroCustoDAO ejbName: UnidadeCentroCustoDAO

            2011-11-08 08:18:52,770 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (HDScanner) Binding the following Entries in Global JNDI:

             

                UnidadeCentroCustoDAO/remote - EJB3.x Default Remote Business Interface

                UnidadeCentroCustoDAO/remote-br.com.prescon.epublic.dao.UnidadeCentroCustoDAORemote - EJB3.x Remote Business Interface

                UnidadeCentroCustoDAO/local - EJB3.x Default Local Business Interface

                UnidadeCentroCustoDAO/local-br.com.prescon.epublic.dao.UnidadeCentroCustoDAOLocal - EJB3.x Local Business Interface

             

            So, I think it's correctly deployed and available to use.