]
jaikiran pai commented on EJBTHREE-2228:
----------------------------------------
Can you please post the exact bean classes code or the attach the application? Just want
to make sure that this issue is fixed correctly.
EJB Injection issue in @Service annotated MBean
-----------------------------------------------
Key: EJBTHREE-2228
URL:
https://issues.jboss.org/browse/EJBTHREE-2228
Project: EJB 3.0
Issue Type: Bug
Environment: JBoss AS 6.0 Final
Reporter: Gregoire Botquin
Assignee: jaikiran pai
I'm currently working on a migration of an application running on 4.2.2 to 6.0. The
application still uses a lot of MBeans (still working with @Service @Management ...
annotations). I know that these annotations are more or less deprecated, but the
deployment was working fine in CR1. Now I got same kind of problems as posts refering to
bug
https://issues.jboss.org/browse/EJBTHREE-2227. I got EJB injection problems. Even if I
try to do the lookups mannually it only randomly works.
As example you have :
@Service
@Management
public MyMBEan{
@EJB
MyEjbClass c;
}
@Stateless
public MyEjbClass{
...
}
Even if I add a dependency (@Depends) on the EJB, it works randomly....
Kind of Stack traces obtained when it doesn't work :
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is
javax.naming.NameNotFoundException: MyConnectionFactory not bound]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1356)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:819)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
[:5.0.5.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_20]
at org.jboss.injection.injector.EEInjector.lookup(EEInjector.java:153)
[:1.0.0-alpha-6]
at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:133)
[:1.0.0-alpha-6]
at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:82)
[:1.0.0-alpha-6]
... 90 more
Caused by: javax.naming.NameNotFoundException: MyConnectionFactory not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:443) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
[:5.0.5.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_20]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350)
[:5.0.5.Final]
... 97 more
OR
17:18:34,052 ERROR [ServiceContainer] Encountered an error in start of
SubcriptionTimerMBean: org.jboss.injection.manager.spi.InjectionException:
javax.naming.NameNotFoundException: preroutingMessageProducer not bound
at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:87)
[:1.0.0-alpha-6]
at
org.jboss.injection.manager.core.DefaultInjectionContext.proceed(DefaultInjectionContext.java:58)
[:1.0.0-alpha-6]
at
org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:58)
[:1.0.0-alpha-6]
at
org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:64)
[:1.0.0-alpha-6]
at
org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:140)
[:1.7.17]
at
org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:125)
[:1.7.17]
at
org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
[:1.7.17]
at
org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)
[:1.7.17]
at
org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
[:1.0.1]
at
org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)
[:1.7.17]
at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1363)
[:1.7.17]
at
org.jboss.ejb3.service.ServiceContainer.injectDependencies(ServiceContainer.java:555)
[:1.7.17]
at
org.jboss.ejb3.service.ServiceContainer.createBeanContext(ServiceContainer.java:151)
[:1.7.17]
at
org.jboss.ejb3.service.ServiceContainer.initBeanContext(ServiceContainer.java:530)
[:1.7.17]
at org.jboss.ejb3.service.ServiceContainer.lockedStart(ServiceContainer.java:261)
[:1.7.17]
at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:1105) [:1.7.17]
at org.jboss.ejb3.service.ServiceContainer.start(ServiceContainer.java:796)
[:1.7.17]
at sun.reflect.GeneratedMethodAccessor525.invoke(Unknown Source) [:1.6.0_20]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]
at
org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
[jboss-reflect.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
[jboss-dependency.jar: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.install(AbstractController.java:894)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182)
[:2.2.0.GA]
at
org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)
[:2.2.0.GA]
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
[:2.2.0.GA]
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]
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.doInstallParentFirst(DeployersImpl.java:1603)
[: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.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151)
[:0.2.2]
at
org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)
[:0.2.2]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
[jboss-kernel.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
[jboss-dependency.jar:2.2.0.GA]
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
[jboss-dependency.jar: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.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190)
[:0.2.2]
at
org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87)
[:0.2.2]
at
org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215)
[:0.2.2]
at
org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159)
[:0.2.2]
at
org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112)
[:0.2.2]
at
org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87)
[:0.2.2]
at
org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91)
[:0.2.2]
at
org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132)
[:6.0.0.Final]
at
org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)
[:6.0.0.Final]
at
org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)
[jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at
org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)
[jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_20]
Caused by: javax.naming.NameNotFoundException: preroutingMessageProducer not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:443) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
at org.jnp.server.NamingServer.lookup(NamingServer.java:399) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)
[:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
[:5.0.5.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_20]
at org.jboss.injection.injector.EEInjector.lookup(EEInjector.java:153)
[:1.0.0-alpha-6]
at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:133)
[:1.0.0-alpha-6]
at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:82)
[:1.0.0-alpha-6]
... 90 more
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: