1 2 Previous Next 17 Replies Latest reply: Jun 1, 2011 4:18 AM by legae RSS

Random NameNotFoundException in jboss 6.1-SNAPSHOT

legae Newbie

i'm using jboss 6.1snapshot.

I have one service that all other services are depended on. In this service I inject some EJBs but there are unused in this service.

 

@javax.ejb.Startup

@javax.ejb.Singleton(mappedName = "app:service=Depends")

public class DependsService{

     @SuppressWarnings("unused")

     @EJB

    @org.jboss.ejb3.annotation.Depends(jboss.j2ee:ear=my.ear,jar=my.jar,service=EJB3,name=MyDependBean")

    private MyDependBeanLocal myBeanLocal;

....

}

 

 

@javax.ejb.Startup

@javax.ejb.Singleton

@javax.ejb.DependsOn(value = {"app:service=Depends" })

public class AService{

    @EJB

    private MyDependBeanLocal myBeanLocal;

....

}

 

 

When jboss starts I have following logs:

 

12:49:01,975 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=my.ear,jar=my.jar,name=DependsService,service=EJB3

12:49:01,977 WARN  [SessionSpecContainer] EJBTHREE-2126: container jboss.j2ee:ear=my.ear,jar=my.jar,name=DependsService,service=EJB3 does not verify the businessObjectFactory

12:49:01,981 INFO  [EJBContainer] STARTED EJB: com.app.service.DependsService ejbName: DependsService

12:49:01,983 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

12:49:02,465 INFO  [AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:DependsService

 

        my/DependsService/no-interface -> EJB3.1 no-interface view

......

12:49:02,552 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=my.ear,jar=my.jar,name=AService,service=EJB3

12:49:02,555 WARN  [SessionSpecContainer] EJBTHREE-2126: container jboss.j2ee:ear=my.ear,jar=my.jar,name=AService,service=E

JB3 does not verify the businessObjectFactory

12:49:02,560 INFO  [EJBContainer] STARTED EJB: com.app.service.AService ejbName: AService

12:49:02,563 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

12:49:02,662 ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

 

This error shows randomly for different beans. What should I add to avoid this?

I was trying to add @Depends annotation on DependsService (not as it is now by each EJB) but it worked even worse

  • 1. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie

    I checked this once again. I added to service (AService) where the MyDependBeanLocal is used in @PostConstruct method a System.out.println("myBeanLocal: "+myBeanLocal);

     

    and this is the output

     

    09:56:15,471 INFO  [STDOUT] myBeanLocal: Proxy to jboss.j2ee:ear=my.ear,jar=my.jar,name=MyDependBean,service=EJB3 implementing [interface com.app.ifaces.MyDependBeanLocal]

    09:56:15,477 ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

     

     

    why in [STDOUT] myBeanLocal looks like it was initialized and ready to use?

    What kind of annotation I should use to make my service dependend on EJB? Is @org.jboss.ejb3.annotation.Depends deprecated or does it really work?

  • 2. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    jaikiran pai Master

    Please post the entire exception stacktrace.

  • 3. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie
    10:48:26,196 INFO  [STDOUT] myBeanLocal: Proxy to jboss.j2ee:ear=my.ear,jar=my.jar,name=MyDependBean,service=EJB3 implementing [interface com.app.ifaces.MyDependBeanLocal]

     

    10:48:26,197 ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

    10:48:26,204 INFO  [STDOUT] 10:48:26,201 ERROR [AService]

    10:48:26,205 INFO  [STDOUT] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

    10:48:26,209 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148)

    10:48:26,211 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227)

    10:48:26,214 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353)

    10:48:26,216 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209)

    10:48:26,218 INFO  [STDOUT]     at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

    10:48:26,220 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,222 INFO  [STDOUT]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

    10:48:26,223 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,225 INFO  [STDOUT]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

    10:48:26,228 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,230 INFO  [STDOUT]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)

    10:48:26,232 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,234 INFO  [STDOUT]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

    10:48:26,235 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,238 INFO  [STDOUT]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

    10:48:26,241 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,243 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

    10:48:26,247 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,249 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

    10:48:26,252 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,254 INFO  [STDOUT]     at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

    10:48:26,257 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,260 INFO  [STDOUT]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:333)

    10:48:26,262 INFO  [STDOUT]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:390)

    10:48:26,265 INFO  [STDOUT]     at sun.reflect.GeneratedMethodAccessor437.invoke(Unknown Source)

    10:48:26,266 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    10:48:26,268 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

    10:48:26,270 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalContainerInvocation.invokeTarget(

    SessionLocalProxyInvocationHandler.java:184)

    10:48:26,274 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

    10:48:26,276 INFO  [STDOUT]     at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143)

    10:48:26,279 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,281 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalInvokableContextHandler.invoke(Se

    ssionLocalProxyInvocationHandler.java:159)

    10:48:26,285 INFO  [STDOUT]     at $Proxy258.invoke(Unknown Source)

    10:48:26,288 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBas

    e.java:185)

    10:48:26,291 INFO  [STDOUT]     at $Proxy302.findAll(Unknown Source)

    10:48:26,292 INFO  [STDOUT]     at com.app.AService.onCreate(AService.java:49)

    10:48:26,294 INFO  [STDOUT]     at com.app.service.AbstractService.create(AbstractService.java:46)

    10:48:26,297 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    10:48:26,299 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    10:48:26,302 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    10:48:26,304 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

    10:48:26,306 INFO  [STDOUT]     at org.jboss.ejb3.interceptors.aop.LifecycleCallbackBeanMethodInterceptor.invoke(LifecycleCallbackBeanMethodIntercepto

    r.java:69)

    10:48:26,310 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,313 INFO  [STDOUT]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.ja

    va:56)

    10:48:26,320 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,322 INFO  [STDOUT]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

    10:48:26,325 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,327 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.ConstructionInvocationContextAdapter.proceed(ConstructionInvocationContextAdapter

    .java:106)

    10:48:26,331 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247)

    10:48:26,332 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:392)

    10:48:26,334 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:211)

    10:48:26,336 INFO  [STDOUT]     at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

    10:48:26,338 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,340 INFO  [STDOUT]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

    10:48:26,343 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,345 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

    10:48:26,348 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,350 INFO  [STDOUT]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)

    10:48:26,352 INFO  [STDOUT]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_19778444.invoke(Invocatio

    nContextInterceptor_z_setup_19778444.java)

    10:48:26,355 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,357 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

    10:48:26,359 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

    10:48:26,362 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1059)

    10:48:26,364 INFO  [STDOUT]     at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1396)

    10:48:26,366 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.postConstruct(AOPBasedSingletonContainer.java:760)

    10:48:26,367 INFO  [STDOUT]     at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.create(SingletonEJBInstanceManagerImpl.java

    :133)

    10:48:26,371 INFO  [STDOUT]     at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.get(SingletonEJBInstanceManagerImpl.java:15

    2)

    10:48:26,375 INFO  [STDOUT]     at org.jboss.ejb3.singleton.deployer.StartupSingletonInitiator.start(StartupSingletonInitiator.java:84)

    10:48:26,378 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    10:48:26,381 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    10:48:26,383 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    10:48:26,387 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

    10:48:26,390 INFO  [STDOUT]     at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)

    10:48:26,395 INFO  [STDOUT]     at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)

    10:48:26,398 INFO  [STDOUT]     at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

    10:48:26,401 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelController

    ContextAction.java:257)

    10:48:26,405 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

    10:48:26,407 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextA

    ction.java:125)

    10:48:26,411 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.j

    ava:72)

    10:48:26,415 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)

    10:48:26,417 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

    10:48:26,418 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

    10:48:26,422 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction

    .java:62)

    10:48:26,426 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

    10:48:26,428 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

    10:48:26,432 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

    10:48:26,435 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

    10:48:26,437 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

    10:48:26,439 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

    10:48:26,441 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

    10:48:26,443 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

    10:48:26,445 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894)

    10:48:26,447 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641)

    10:48:26,450 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182)

    10:48:26,453 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)

    10:48:26,455 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:

    63)

    10:48:26,459 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

    10:48:26,461 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

    10:48:26,463 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)

    10:48:26,465 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)

    10:48:26,467 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571)

    10:48:26,470 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603)

    10:48:26,472 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)

    10:48:26,474 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

    10:48:26,477 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

    10:48:26,479 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

    10:48:26,481 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

    10:48:26,484 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

    10:48:26,486 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

    10:48:26,489 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

    10:48:26,491 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

    10:48:26,493 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)

    10:48:26,496 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)

    10:48:26,498 INFO  [STDOUT]     at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)

    10:48:26,500 INFO  [STDOUT]     at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)

    10:48:26,504 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java

    :143)

    10:48:26,508 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151)

    10:48:26,510 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)

    10:48:26,514 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

    10:48:26,516 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

    10:48:26,518 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction

    .java:62)

    10:48:26,522 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

    10:48:26,524 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

    10:48:26,527 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

    10:48:26,529 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

    10:48:26,532 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

    10:48:26,534 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

    10:48:26,536 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

    10:48:26,539 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

    10:48:26,541 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

    10:48:26,543 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

    10:48:26,546 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.

    java:190)

    10:48:26,549 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87)

    10:48:26,551 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215)

    10:48:26,554 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159)

    10:48:26,557 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:11

    2)

    10:48:26,560 INFO  [STDOUT]     at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87)

    10:48:26,563 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91)

    10:48:26,565 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.ja

    va:132)

    10:48:26,569 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.ja

    va:56)

    10:48:26,573 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)

    10:48:26,575 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)

    10:48:26,577 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:619)

    10:48:26,579 INFO  [STDOUT] Caused by: org.jboss.injection.manager.spi.InjectionException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

    10:48:26,583 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:86)

    10:48:26,585 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionContext.proceed(DefaultInjectionContext.java:58)

    10:48:26,588 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:58)

    10:48:26,590 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:64)

    10:48:26,592 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:140)

    10:48:26,595 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:125)

    10:48:26,597 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

    10:48:26,601 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)

    10:48:26,603 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

    10:48:26,605 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)

    10:48:26,607 INFO  [STDOUT]     at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1363)

    10:48:26,610 INFO  [STDOUT]     at org.jboss.ejb3.stateless.StatelessContainer.createBeanContext(StatelessContainer.java:139)

    10:48:26,613 INFO  [STDOUT]     at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:94)

    10:48:26,615 INFO  [STDOUT]     at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:81)

    10:48:26,618 INFO  [STDOUT]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62)

    10:48:26,620 INFO  [STDOUT]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57)

    10:48:26,622 INFO  [STDOUT]     at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54)

    10:48:26,624 INFO  [STDOUT]     at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86)

    10:48:26,626 INFO  [STDOUT]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)

    10:48:26,629 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

    10:48:26,631 INFO  [STDOUT]     at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95)

    10:48:26,634 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223)

    10:48:26,636 INFO  [STDOUT]     ... 141 more

    10:48:26,639 INFO  [STDOUT] Caused by: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

    10:48:26,641 INFO  [STDOUT]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

    10:48:26,644 INFO  [STDOUT]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

    10:48:26,646 INFO  [STDOUT]     at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

    10:48:26,649 INFO  [STDOUT]     at org.jnp.server.NamingServer.lookup(NamingServer.java:396)

    10:48:26,651 INFO  [STDOUT]     at org.jnp.server.NamingServer.lookup(NamingServer.java:399)

    10:48:26,653 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

    10:48:26,655 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)

    10:48:26,657 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

    10:48:26,659 INFO  [STDOUT]     at javax.naming.InitialContext.lookup(InitialContext.java:392)

    10:48:26,661 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.lookup(EEInjector.java:152)

    10:48:26,663 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:132)

    10:48:26,666 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:81)

    10:48:26,668 INFO  [STDOUT]     ... 162 more

  • 4. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie

    I see that nobody has a idea how to solve my problem.

    I checked once again the code and I saw that I have cycles in EJB dependencies.

     

    @Stateless

    public class ABean implements ABeanLocal{

     

    @EJB

    BBeanLocal bBean;

    ....

    }

     

     

    @Stateless

    public class BBean implements BBeanLocal{

     

    @EJB

    ABeanLocal aBean;

    ....

    }

     

    I was trying to add  @org.jboss.ejb3.annotation.IgnoreDependency but the exception still occurs. I also checked finding a bean by lookup and the effect is the same. in STDOUT looks like bean was initialized but when trying to use it (in my situation - call a method findById) exception is thrown

     

    [STDOUT] myBeanLocal: Proxy to jboss.j2ee:ear=my.ear,jar=my.jar,name=MyDependBean,service=EJB3 implementing [interface com.app.ifaces.MyDependBeanLocal]

    ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.app.MyDependBean not bound

     

    I remember that in jboss 4.2.3 when ejb was not bound was treated as a null. Maybe there is some property that I could check to be sure that bean is bound?  Or is there any annotation to force jboss to load beans?

     

    Application is quite big and we used jboss 4.2.3 before so maybe I have still some 4.2.3jboss annotation but I assume that when 6.1 jboss does not use it so the old annotations should not be a problem

  • 5. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie

    Previous post about bean dependency cycles was misleading. In my beans I have queues added.

     

    @Stateless

    public class ABean implements ABeanLocal{

     

    @EJB

    BBeanLocal bBean;

     

    @Resource(mappedName ="java:/JmsXA")

        private javax.jms.ConnectionFactory    connectionFactory = null;

     

        @Resource(mappedName = "queue/testQueue")

        private javax.jms.Queue                     queue             = null;

     

    }

     

    When I commented lines with queues method call was invoked without any problem and result was satisfying.

    The application (with queues) was implemented for jboss 4.2.3 and now we wanted to upgrade to 6.0.0Final but there were problems with queues http://community.jboss.org/thread/165508?tstart=0 and I was asked to move to 6.1 and it looked perfect, but now I have a feeling that the problem still exists but is just only covered (no errors visible)

    All my changes about queues when moving from 4.2.3 was adding to jboss-6.1.0-SNAPSHOT\server\default\deploy\hornetq\hornetq-jms.xml file queues definitions.

    Should I do something special. Maybe some dependencies, adding resources to hornetq ??

  • 6. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    jaikiran pai Master

    To be honest, I still haven't understood what issue you are running into. I see multiple sets of code being posted and am confused trying to relate it to the logs. Can you please attach a simple application which reproduces this issue on 6.1.0-SNAPSHOT?

  • 7. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie
    @javax.ejb.Startup
    @javax.ejb.Singleton
    public class DependsService {
    
       @javax.ejb.EJB
       @org.jboss.ejb3.annotation.Depends("jboss.j2ee:ear=SimpleTests.ear,jar=SimpleTests.jar,service=EJB3,name=ZBean")
       ZBeanLocal zBean;
    
       @PostConstruct
       public void create(){
           System.out.println("ZBeanLocal: "+zBean);
           List<ZEntity> list = zBean.findAll();
           System.out.println("list: "+list.size());
       }
    
    }
    

     

    @javax.ejb.Local
    public interface ZBeanLocal {
        public List<ZEntity> findAll();
    }
    

     

    @javax.ejb.Stateless
    public class ZBean  implements ZBeanLocal{
    
        @PersistenceContext(unitName = "TestPU")
        private EntityManager em = null;
    
        @Resource(mappedName = "java:/JmsXA")
        javax.jms.ConnectionFactory connFactory;
        @Resource(mappedName = "queue/TestQueue")
        javax.jms.Queue  q1;
    
    
        public List<ZEntity> findAll(){        
            Query q = em.createNamedQuery("findAll");
            return (List<ZEntity>)q.getResultList(); 
        }
    }
    

    hornetq-jms.xml

    <queue name="TestQueue">

            <entry name="queue/TestQueue"/>

        </queue>

     

    Application was written for jboss 4.2.3 and now is porting to jboss 6.1-SNAPSHOT because problems with loading queues were occuring http://community.jboss.org/message/600965#600965 on jboss 6.0.0Final

    Now when DependsService starts I see in logs:

    15:20:04,501 INFO  [STDOUT] ZBeanLocal: Proxy to jboss.j2ee:ear=SimpleTests.ear,jar=SimpleTests.jar,name=ZBean,service=EJB3 implementing [interface co

    m.test.beans.ZBeanLocal]

    but when findAll method is called exception is thrown.

     

    10:48:26,197 ERROR [CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.test.beans.ZBean not bound

     

    10:48:26,204 INFO  [STDOUT] 10:48:26,201 ERROR [DependsService]

     

    10:48:26,205 INFO  [STDOUT] javax.ejb.EJBTransactionRolledbackException: javax.naming.NameNotFoundException: com.test.beans.ZBean not bound

     

    10:48:26,209 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148)

     

    10:48:26,211 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227)

     

    10:48:26,214 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353)

     

    10:48:26,216 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209)

     

    10:48:26,218 INFO  [STDOUT]     at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

     

    10:48:26,220 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,222 INFO  [STDOUT]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

     

    10:48:26,223 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,225 INFO  [STDOUT]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

     

    10:48:26,228 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,230 INFO  [STDOUT]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182)

     

    10:48:26,232 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,234 INFO  [STDOUT]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

     

    10:48:26,235 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,238 INFO  [STDOUT]     at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

     

    10:48:26,241 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,243 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

     

     

    10:48:26,247 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,249 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

     

    10:48:26,252 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,254 INFO  [STDOUT]     at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

     

    10:48:26,257 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,260 INFO  [STDOUT]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:333)

     

    10:48:26,262 INFO  [STDOUT]     at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:390)

     

    10:48:26,265 INFO  [STDOUT]     at sun.reflect.GeneratedMethodAccessor437.invoke(Unknown Source)

     

    10:48:26,266 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

     

    10:48:26,268 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

     

    10:48:26,270 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalContainerInvocation.invokeTarget(

     

    SessionLocalProxyInvocationHandler.java:184)

     

    10:48:26,274 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

     

    10:48:26,276 INFO  [STDOUT]     at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143)

     

    10:48:26,279 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,281 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalInvokableContextHandler.invoke(Se

     

    ssionLocalProxyInvocationHandler.java:159)

     

    10:48:26,285 INFO  [STDOUT]     at $Proxy258.invoke(Unknown Source)

     

    10:48:26,288 INFO  [STDOUT]     at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBas

     

    e.java:185)

     

    10:48:26,291 INFO  [STDOUT]     at $Proxy302.findAll(Unknown Source)

     

    10:48:26,294 INFO  [STDOUT]     at com.test.service.DependsService.create(DependsService.java:25)

     

    10:48:26,297 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

     

    10:48:26,299 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

     

    10:48:26,302 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

     

    10:48:26,304 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

     

    10:48:26,306 INFO  [STDOUT]     at org.jboss.ejb3.interceptors.aop.LifecycleCallbackBeanMethodInterceptor.invoke(LifecycleCallbackBeanMethodIntercepto

     

    r.java:69)

     

    10:48:26,310 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,313 INFO  [STDOUT]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.ja

     

    va:56)

     

    10:48:26,320 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,322 INFO  [STDOUT]     at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

     

    10:48:26,325 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,327 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.ConstructionInvocationContextAdapter.proceed(ConstructionInvocationContextAdapter

     

    .java:106)

     

    10:48:26,331 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247)

     

    10:48:26,332 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:392)

     

    10:48:26,334 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:211)

     

    10:48:26,336 INFO  [STDOUT]     at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)

     

    10:48:26,338 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,340 INFO  [STDOUT]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

     

    10:48:26,343 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,345 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

     

     

    10:48:26,348 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,350 INFO  [STDOUT]     at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)

     

    10:48:26,352 INFO  [STDOUT]     at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_19778444.invoke(Invocatio

     

    nContextInterceptor_z_setup_19778444.java)

     

    10:48:26,355 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,357 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

     

    10:48:26,359 INFO  [STDOUT]     at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:80)

     

    10:48:26,362 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.invokeCallback(AOPBasedSingletonContainer.java:1059)

     

    10:48:26,364 INFO  [STDOUT]     at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1396)

     

    10:48:26,366 INFO  [STDOUT]     at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.postConstruct(AOPBasedSingletonContainer.java:760)

     

    10:48:26,367 INFO  [STDOUT]     at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.create(SingletonEJBInstanceManagerImpl.java

     

    :133)

     

    10:48:26,371 INFO  [STDOUT]     at org.jboss.ejb3.singleton.impl.container.SingletonEJBInstanceManagerImpl.get(SingletonEJBInstanceManagerImpl.java:15

     

    2)

     

    10:48:26,375 INFO  [STDOUT]     at org.jboss.ejb3.singleton.deployer.StartupSingletonInitiator.start(StartupSingletonInitiator.java:84)

     

    10:48:26,378 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

     

    10:48:26,381 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

     

    10:48:26,383 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

     

    10:48:26,387 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

     

    10:48:26,390 INFO  [STDOUT]     at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60)

     

    10:48:26,395 INFO  [STDOUT]     at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168)

     

    10:48:26,398 INFO  [STDOUT]     at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

     

    10:48:26,401 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelController

     

    ContextAction.java:257)

     

    10:48:26,405 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

     

    10:48:26,407 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextA

     

    ction.java:125)

     

    10:48:26,411 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.j

     

    ava:72)

     

    10:48:26,415 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202)

     

    10:48:26,417 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

     

    10:48:26,418 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

     

    10:48:26,422 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction

     

    .java:62)

     

    10:48:26,426 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

     

    10:48:26,428 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

     

    10:48:26,432 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    10:48:26,435 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    10:48:26,437 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    10:48:26,439 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    10:48:26,441 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    10:48:26,443 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    10:48:26,445 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894)

     

    10:48:26,447 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641)

     

    10:48:26,450 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182)

     

    10:48:26,453 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)

     

    10:48:26,455 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:

     

    63)

     

    10:48:26,459 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

     

    10:48:26,461 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

     

    10:48:26,463 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)

     

    10:48:26,465 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)

     

    10:48:26,467 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571)

     

    10:48:26,470 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603)

     

    10:48:26,472 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)

     

    10:48:26,474 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    10:48:26,477 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    10:48:26,479 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    10:48:26,481 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    10:48:26,484 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    10:48:26,486 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    10:48:26,489 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

     

    10:48:26,491 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

     

    10:48:26,493 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)

     

    10:48:26,496 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)

     

    10:48:26,498 INFO  [STDOUT]     at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)

     

    10:48:26,500 INFO  [STDOUT]     at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)

     

    10:48:26,504 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java

     

    :143)

     

    10:48:26,508 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151)

     

    10:48:26,510 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)

     

    10:48:26,514 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

     

    10:48:26,516 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

     

    10:48:26,518 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction

     

    .java:62)

     

    10:48:26,522 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

     

    10:48:26,524 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

     

    10:48:26,527 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    10:48:26,529 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    10:48:26,532 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    10:48:26,534 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    10:48:26,536 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    10:48:26,539 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    10:48:26,541 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

     

    10:48:26,543 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

     

    10:48:26,546 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.

     

    java:190)

     

    10:48:26,549 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87)

     

    10:48:26,551 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215)

     

    10:48:26,554 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159)

     

    10:48:26,557 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:11

     

    2)

     

    10:48:26,560 INFO  [STDOUT]     at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87)

     

    10:48:26,563 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91)

     

    10:48:26,565 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.ja

     

    va:132)

     

    10:48:26,569 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.ja

     

    va:56)

     

    10:48:26,573 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)

     

    10:48:26,575 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)

     

    10:48:26,577 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:619)

     

    10:48:26,579 INFO  [STDOUT] Caused by: org.jboss.injection.manager.spi.InjectionException: javax.naming.NameNotFoundException: com.test.beans.ZBean not bound

     

    10:48:26,583 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:86)

     

    10:48:26,585 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionContext.proceed(DefaultInjectionContext.java:58)

     

    10:48:26,588 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:58)

     

    10:48:26,590 INFO  [STDOUT]     at org.jboss.injection.manager.core.DefaultInjectionManager.inject(DefaultInjectionManager.java:64)

     

    10:48:26,592 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:140)

     

    10:48:26,595 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:125)

     

    10:48:26,597 INFO  [STDOUT]     at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)

     

     

     

    10:48:26,601 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)

     

    10:48:26,603 INFO  [STDOUT]     at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

     

    10:48:26,605 INFO  [STDOUT]     at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:116)

     

    10:48:26,607 INFO  [STDOUT]     at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1363)

     

    10:48:26,610 INFO  [STDOUT]     at org.jboss.ejb3.stateless.StatelessContainer.createBeanContext(StatelessContainer.java:139)

     

    10:48:26,613 INFO  [STDOUT]     at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:94)

     

    10:48:26,615 INFO  [STDOUT]     at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:81)

     

    10:48:26,618 INFO  [STDOUT]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62)

     

    10:48:26,620 INFO  [STDOUT]     at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57)

     

    10:48:26,622 INFO  [STDOUT]     at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54)

     

    10:48:26,624 INFO  [STDOUT]     at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86)

     

    10:48:26,626 INFO  [STDOUT]     at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)

     

    10:48:26,629 INFO  [STDOUT]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

     

    10:48:26,631 INFO  [STDOUT]     at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95)

     

    10:48:26,634 INFO  [STDOUT]     at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223)

     

    10:48:26,636 INFO  [STDOUT]     ... 141 more

     

    10:48:26,639 INFO  [STDOUT] Caused by: javax.naming.NameNotFoundException: com.test.beans.ZBean not bound

     

    10:48:26,641 INFO  [STDOUT]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

     

    10:48:26,644 INFO  [STDOUT]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

     

    10:48:26,646 INFO  [STDOUT]     at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

     

    10:48:26,649 INFO  [STDOUT]     at org.jnp.server.NamingServer.lookup(NamingServer.java:396)

     

    10:48:26,651 INFO  [STDOUT]     at org.jnp.server.NamingServer.lookup(NamingServer.java:399)

     

    10:48:26,653 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

     

    10:48:26,655 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:835)

     

    10:48:26,657 INFO  [STDOUT]     at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

     

    10:48:26,659 INFO  [STDOUT]     at javax.naming.InitialContext.lookup(InitialContext.java:392)

     

    10:48:26,661 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.lookup(EEInjector.java:152)

    10:48:26,663 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:132)

    10:48:26,666 INFO  [STDOUT]     at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:81)

    10:48:26,668 INFO  [STDOUT]     ... 162 more

     

     

    When I remove from ZBean queue loading everything is ok. Additionally when my application is small everything is ok, but when I try to deploy a huge application above exception is thrown

  • 8. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    Tim Haley Newbie

    I am having the same issue.

     

    I see entries like this in my boot.log:

     

    12:49:01,125 INFO  [EjbDeployer] installing bean: ejb/xyz.jar#StationHealthAuditTimer,uid917142622

    12:49:01,126 INFO  [EjbDeployer]   with dependencies:

    12:49:01,128 INFO  [EjbDeployer]   and supplies:

    12:49:01,129 INFO  [EjbDeployer]  jndi:foobar/StationHealthAuditTimer/com.company.system.xyz.StationHealthAuditTimer

    12:49:01,130 INFO  [EjbDeployer]  jndi:foobar/StationHealthAuditTimer/com.company.system.xyz.StationHealthAuditTimerLocal

    12:49:01,131 INFO  [EjbDeployer]  jndi:ejb/StationHealthAuditTimerHome

    12:49:01,132 INFO  [EjbDeployer]  jndi:ejb/StationHealthAuditTimerLocalHome

     

     

    Then my @Startup bean (Lifecycle) in installed:

     

     

    10:44:42,361 WARN  [InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated
    10:44:42,981 INFO  [SingletonContainerDeployer] Installing container for EJB Lifecycle
    10:44:42,981 INFO  [SingletonContainerDeployer] with dependencies:
    10:44:42,982 INFO  [SingletonContainerDeployer] with demands:
    10:44:42,984 INFO  [SingletonContainerDeployer] with supplies:
    10:44:42,999 INFO  [SingletonBeanJNDIBinderDeployer] Binding the following entries in JNDI for singleton bean: Lifecycle

    10:44:43,181 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=foobar.ear,jar=ejb3SEE.jar,name=Lifecycle,service=EJB3
    10:44:43,182 WARN  [SessionSpecContainer] EJBTHREE-2126: container jboss.j2ee:ear=foobar.ear,jar=ejb3SEE.jar,name=Lifecycle,service=EJB3 does not verify the businessObjectFactory

     

    and invoked:

     

    10:44:43,185 INFO  [EJBContainer] STARTED EJB: com.company.system.ejbvendor.jboss.Lifecycle ejbName: Lifecycle
    10:44:43,196 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
    10:44:44,030 INFO  [STDOUT] Lifecycle.startup() executed

     

     

    Eventually, my startup bean attempts to use a JNDI lookup (ejb/StationHealthAuditTimerHome) to access my 'StationHealthAuditTimer' bean, resulting in an error:

     

     

    10:44:45,078 INFO  [STDOUT] javax.naming.NameNotFoundException: ejb not bound

    10:44:45,079 INFO  [STDOUT]  at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

    10:44:45,080 INFO  [STDOUT]  at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)

    10:44:45,081 INFO  [STDOUT]  at org.jnp.server.NamingServer.getObject(NamingServer.java:785)

    10:44:45,083 INFO  [STDOUT]  at org.jnp.server.NamingServer.lookup(NamingServer.java:396)

    10:44:45,084 INFO  [STDOUT]  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)

    10:44:45,085 INFO  [STDOUT]  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)

    10:44:45,086 INFO  [STDOUT]  at javax.naming.InitialContext.lookup(InitialContext.java:392)

     

     

    later in the log I see this:

     

     

    10:44:51,188 INFO  [BaseLocalProxyFactory] Bound EJB LocalHome 'StationHealthAuditTimer' to jndi 'ejb/StationHealthAuditTimerLocalHome'

    10:44:51,196 INFO  [ProxyFactory] Bound EJB Home 'StationHealthAuditTimer' to jndi 'ejb/StationHealthAuditTimerHome'

     

     

    So, it looks like the 'StationHealthAuditTimer' bean is deployed and associated with the correct JNDI, but it is not actually bound to jndi until after my @Startup bean is invoked.

     

    Did something happen to change the timing of the invocation for a @Startupbean in JBoss AS 6.1 SNAPSHOT? 

    This works correctly in JBoss AS 6.0.0 Final.

     

    Thanks,

     

    Tim

  • 9. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie

    I think I found solution to my problem.

    When i removed from ZBean queue resource everything was ok. That's why I was trying to do sth with queue. I added queue depends and somehow now the findAll method can be invoked and no excpetion is thrown. I'm not 100% sure whether it's the right solution but for me it worked

     

    @javax.ejb.Stateless
    public class ZBean  implements ZBeanLocal{

        @PersistenceContext(unitName = "TestPU")
        private EntityManager em = null;

        @Resource(mappedName = "java:/JmsXA")
        javax.jms.ConnectionFactory connFactory;
        @Resource(mappedName = "queue/TestQueue")

        @org.jboss.ejb3.annotation.Depends("org.hornetq:module=JMS,type=Queue,name=\"TestQueue\"")
        javax.jms.Queue  q1;


        public List<ZEntity> findAll(){       
            Query q = em.createNamedQuery("findAll");
            return (List<ZEntity>)q.getResultList();
        }
    }

  • 10. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    jaikiran pai Master

    legae wrote:

     

    ...
    I added queue depends and somehow now the findAll method can be invoked and no excpetion is thrown. I'm not 100% sure whether it's the right solution but for me it worked

     

    @javax.ejb.Stateless
    public class ZBean  implements ZBeanLocal{

        @PersistenceContext(unitName = "TestPU")
        private EntityManager em = null;

        @Resource(mappedName = "java:/JmsXA")
        javax.jms.ConnectionFactory connFactory;
        @Resource(mappedName = "queue/TestQueue")

        @org.jboss.ejb3.annotation.Depends("org.hornetq:module=JMS,type=Queue,name=\"TestQueue\"")
        javax.jms.Queue  q1;


        public List<ZEntity> findAll(){       
            Query q = em.createNamedQuery("findAll");
            return (List<ZEntity>)q.getResultList();
        }
    }

    That's the correct solution.

  • 11. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    Tim Haley Newbie

    I'm a little confused by this.

    A singleton startup bean depends on a stateless session bean that depends on a queue.

    Without jboss-specific annotations mapping these dependencies, in addition to the standard @Bean and @Resource injection annotations declaring the dependencies, JBoss fails to instantiate the beans and the queue prior to invoking the bean.

    That doesn't seem right.

  • 12. Re: Random NameNotFoundException in jboss 6.1-SNAPSHOT
    jaikiran pai Master

    Tim Haley wrote:

     

    I'm a little confused by this.

    A singleton startup bean depends on a stateless session bean that depends on a queue.


    Using @Resource with a javax.jms.Queue (or Topic) doesn't implicitly add a "dependency" on the queue. There's no easy way to do that, but can be done if required in later releases.

  • 13. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    legae Newbie

    Jaikiran,

     

    thanks for help.

    I have one more question about the queues dependencies.

    I understand that queue need to be available when bean uses it, but why (in my case) method findAll() threw exception 'javax.naming.NameNotFoundException com.test.beans.ZBean not bound' when there was not a queue used in it?

     

    I spend a lot of time to find out that this is queue problem, especially that findAll() didn't use it. I'm not sure but I think that in jboss 4.2.3 when bean was not ready to use was null so there was easy checking  (bean == null) {  lookup for it }. Now when I wanted to check bean I could see it's proxy 'Proxy to jboss.j2ee:ear=SimpleTests.ear,jar=SimpleTests.jar,name=ZBean,service=EJB3 implementing [interface com.test.beans.ZBeanLocal]'.

     

    I was trying different things with bean implementation and finally when I removed '@Resource Queue' I could use findAll() method. Maybe the excpetion could be more specific that there is some problem with bean resources?

    Is this common behaviour that I can see bean proxy class (bean is not null) and bean is not ready to use? And what about @IgnoreDependency annotation - is it safe to use it?  Will @Resource or @EJB be loaded when needed or not?

  • 14. Random NameNotFoundException in jboss 6.1-SNAPSHOT
    Tim Haley Newbie

    What about beans and other resources? Does @EJB implicitly add a dependency on the bean? Does @Resource for other resource types like data sources and connection factories add a dependency on the resource?

    I assume that this is true whether I use annotations or deployment descriptors (jboss.xml).

    Is this specific to startup beans, or does this apply generally to all beans?

1 2 Previous Next