Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10454

MBean calling EJB in start method fails as EJB is not fully installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: EAP_EWP 5.3.0.ER1
    • Component/s: EJB
    • Labels:
      None
    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use remote interface when calling EJB from the MBean's start() method or convert MBean into an MC Bean by using a jboss-beans.xml instead of *-service.xml. Example:

      <?xml version="1.0" encoding="UTF-8"?>
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
      	<!-- NOTE: bean "name" can be anything, "class" is the current MBean class that we are trying to turn into an MC bean -->
      	<bean name="SomeBean" class="com.jboss.example.mbean.SampleService">
                  <!-- IMPORTANT: JMX "name" must be different from the "bean name" defined in the line above! -->
      	     <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="Blah:service=BlahBlah", exposedInterface=com.jboss.example.mbean.SomeServiceMBean.class, registerDirectly=true)</annotation>
      	     <demand>jboss.j2ee:jar=HelloWorldEJB.jar,name=HelloWorld,service=EJB3</demand>
              </bean>
      </deployment>
      
      Show
      Use remote interface when calling EJB from the MBean's start() method or convert MBean into an MC Bean by using a jboss-beans.xml instead of *-service.xml. Example: <?xml version= "1.0" encoding= "UTF-8" ?> <deployment xmlns= "urn:jboss:bean-deployer:2.0" > <!-- NOTE: bean "name" can be anything, "class" is the current MBean class that we are trying to turn into an MC bean --> <bean name= "SomeBean" class= "com.jboss.example.mbean.SampleService" > <!-- IMPORTANT: JMX "name" must be different from the "bean name" defined in the line above! --> <annotation> @org.jboss.aop.microcontainer.aspects.jmx.JMX(name= "Blah:service=BlahBlah" , exposedInterface=com.jboss.example.mbean.SomeServiceMBean.class, registerDirectly=true) </annotation> <demand> jboss.j2ee:jar=HelloWorldEJB.jar,name=HelloWorld,service=EJB3 </demand> </bean> </deployment>
    • Release Notes Text:
      Hide
      Previous versions of JBoss EAP 5 presented an issue wherein an Mbean start() method could return an error when calling an EJB. This was because the call was being made before the Mbean was fully installed. This issue has been corrected in this release of the product.
      Show
      Previous versions of JBoss EAP 5 presented an issue wherein an Mbean start() method could return an error when calling an EJB. This was because the call was being made before the Mbean was fully installed. This issue has been corrected in this release of the product.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      Setup:
      MBean is dependent on an EJB

      Basically, in my MBean start() method, when it tries to make an EJB call to its local interface, we will get this error. Does not happen with remote interface or converting this MBean to an MC bean.

      22:37:11,641 ERROR [STDERR] org.jboss.ejb3.common.registrar.spi.NotBoundException: Object is bound at key jboss.j2ee:jar=HelloWorldEJB.jar,name=HelloWorld,service=EJB3, but is not fully installed, instead of state: ControllerState@20dbd794{Start}
      22:37:11,642 ERROR [STDERR]     at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.lookup(Ejb3McRegistrar.java:170)
      22:37:11,642 ERROR [STDERR]     at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.lookup(Ejb3McRegistrar.java:134)
      22:37:11,642 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.getContainerLocally(SessionProxyInvocationHandlerBase.java:404)
      22:37:11,642 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler.getContainer(SessionLocalProxyInvocationHandler.java:87)
      22:37:11,642 ERROR [STDERR]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:170)
      22:37:11,642 ERROR [STDERR]     at $Proxy116.sayHello(Unknown Source)
      22:37:11,642 ERROR [STDERR]     at com.jboss.example.mbean.BarrierService.start(BarrierService.java:61)
      22:37:11,642 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      22:37:11,642 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      22:37:11,642 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      22:37:11,642 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
      22:37:11,642 ERROR [STDERR]     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      22:37:11,642 ERROR [STDERR]     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      22:37:11,642 ERROR [STDERR]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      22:37:11,642 ERROR [STDERR]     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      22:37:11,642 ERROR [STDERR]     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      22:37:11,642 ERROR [STDERR]     at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      22:37:11,643 ERROR [STDERR]     at $Proxy38.start(Unknown Source)
      22:37:11,643 ERROR [STDERR]     at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      22:37:11,643 ERROR [STDERR]     at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      22:37:11,643 ERROR [STDERR]     at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      22:37:11,643 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      22:37:11,643 ERROR [STDERR]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:125)
      22:37:11,643 ERROR [STDERR]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:52)
      22:37:11,643 ERROR [STDERR]     at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      22:37:11,643 ERROR [STDERR]     at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      22:37:11,643 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
      22:37:11,644 ERROR [STDERR]     at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
      22:37:11,644 ERROR [STDERR]     at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      22:37:11,644 ERROR [STDERR]     at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      22:37:11,644 ERROR [STDERR]     at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      22:37:11,644 ERROR [STDERR]     at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
      22:37:11,644 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      22:37:11,645 ERROR [STDERR]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      22:37:11,645 ERROR [STDERR]     at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
      22:37:11,645 ERROR [STDERR]     at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      22:37:11,645 ERROR [STDERR]     at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      22:37:11,645 ERROR [STDERR]     at org.jboss.Main.boot(Main.java:221)
      22:37:11,645 ERROR [STDERR]     at org.jboss.Main$1.run(Main.java:556)
      22:37:11,645 ERROR [STDERR]     at java.lang.Thread.run(Unknown Source)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  wolfc Carlo de Wolf
                  Reporter:
                  dchia David Chia
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: