6 Replies Latest reply on Jul 2, 2011 3:25 PM by Maxym Pendyshchuk

    Enabling CDI in EAR (specifically in ejb part of ear)

    Maxym Pendyshchuk Newbie

      I seem to reach a deadlock solving the following puzzle:

       

      I have ear with ejb-jar and war files inside. Everything works ok.

       

      Now, when I add empty beans.xml file to ejb-jar (in META-INF folder) I get problems, looks like my war project is getting initialized before ejb-jar is fully initialized and I get NameNotFoundException. From exception stack I see that init method of servlet is executed, and it relies on EJB injection which was successfully done (proxy for EJB service was generated), but EJB injections for that proxy were not generated (for DAO)... In fact, in case of having beans.xml in ejb-jar, I see that few EJB services were bound, and then immediately init method of Servlet was executed. If I remove beans.xml file then I see that all ejb services were bound and only then Servlets are inited (so everything goes well).

       

      I spent the whole day playing with it with no success, I need cdi to be enabled ifor ejb project because I want to use AutoValidating for Hibernate Validator there (maybe I should place beans.xml somewhere else? I just thought that it would be illogical, but maybe I should think differently

       

      Please, tell me which way should I move, what should I check? For now I even don't know what to post here (which configs, other files etc.)

       

      thank you in advance

       

      PS. sorry, forgot to mention that I use JBoss 6.0.Final. I also tried to update few WELD jars (to use 1.1 Final, because JBoss AS seems to use Beta2). Updating didn't help

        • 1. Re: Enabling CDI in EAR (specifically in ejb part of ear)
          Maxym Pendyshchuk Newbie

          I've created an example of what I am dealing with. There are 3 Eclipse projects:

          1) Engine (ejb-jar)

          2) Presentation (war)

          3) EARPackaging (Enterprise Application Project)

          I used JBoss 6.0 Final AS, JDK 1.7 (last build available). To set it up you will probably need to change Build Path libraries.

           

          Servlet look slike:

           

          public class TestingServlet implements Servlet {
          
              private TestingService service;
              
              /** some methods are cut **/
          
              @Override
              public void init(ServletConfig config) throws ServletException {
                  System.out.println( "EJB SERVICE IS SET: " + service );
                  System.out.println( service.testCDI() );
              }
          
              @Override
              public void service(ServletRequest request, ServletResponse response)
                      throws ServletException, IOException {
                  PrintWriter out = response.getWriter();
                  response.setContentType( "text/html; charset=UTF-8" );
                  out.println( service.testCDI() );
              }
              
              @EJB(name = "TestingService")
              public void setTestingService(TestingService service)
              {
                 this.service = service;
              }
              
          }
          

           

          and I have TestingService which uses TestingDAO (injected by @EJB). When I run server without beans.xml in ejb-jar, then my log looks like:

           

          23:53:57,390 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=EARPackaging.ear,jar=Engine.jar,name=TestingDAO,service=EJB3
          23:53:57,400 INFO  [EJBContainer] STARTED EJB: org.example.dao.impl.TestingDAOImpl ejbName: TestingDAO
          23:53:57,451 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
          
              EARPackaging/TestingDAO/local - EJB3.x Default Local Business Interface
              EARPackaging/TestingDAO/local-org.example.dao.TestingDAO - EJB3.x Local Business Interface
          
          23:53:57,455 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
          23:53:58,087 INFO  [SessionSpecContainer] Starting jboss.j2ee:ear=EARPackaging.ear,jar=Engine.jar,name=TestingService,service=EJB3
          23:53:58,090 INFO  [EJBContainer] STARTED EJB: org.example.service.impl.TestingServiceImpl ejbName: TestingService
          23:53:58,096 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
          
              EARPackaging/TestingService/local - EJB3.x Default Local Business Interface
              EARPackaging/TestingService/local-org.example.service.TestingService - EJB3.x Local Business Interface
          
          23:53:58,098 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
          23:53:58,125 INFO  [TomcatDeployment] deploy, ctxPath=/CDITest
          23:53:58,536 INFO  [STDOUT] EJB SERVICE IS SET: Proxy to jboss.j2ee:ear=EARPackaging.ear,jar=Engine.jar,name=TestingService,service=EJB3 implementing [interface org.example.service.TestingService]
          23:53:58,775 INFO  [STDOUT] Everything's OK
          

           

          when I add empty beans.xml, then most of time I see the following:

           

          2011-07-01 23:57:43,745 INFO  [org.jboss.ejb3.EJBContainer] (Thread-2) STARTED EJB: org.example.service.impl.TestingServiceImpl ejbName: TestingService
          2011-07-01 23:57:43,788 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (Thread-2) Binding the following Entries in Global JNDI:
          
              EARPackaging/TestingService/local - EJB3.x Default Local Business Interface
              EARPackaging/TestingService/local-org.example.service.TestingService - EJB3.x Local Business Interface
          
          2011-07-01 23:57:43,792 WARN  [org.jboss.ejb3.TimerServiceContainer] (Thread-2) EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
          2011-07-01 23:57:44,460 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (Thread-2) Starting jboss.j2ee:ear=EARPackaging.ear,jar=Engine.jar,name=TestingDAO,service=EJB3
          2011-07-01 23:57:44,461 INFO  [org.jboss.ejb3.EJBContainer] (Thread-2) STARTED EJB: org.example.dao.impl.TestingDAOImpl ejbName: TestingDAO
          2011-07-01 23:57:44,467 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (Thread-2) deploy, ctxPath=/CDITest
          2011-07-01 23:57:44,543 INFO  [STDOUT] (Thread-2) EJB SERVICE IS SET: Proxy to jboss.j2ee:ear=EARPackaging.ear,jar=Engine.jar,name=TestingService,service=EJB3 implementing [interface org.example.service.TestingService]
          2011-07-01 23:57:44,677 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CDITest]] (Thread-2) StandardWrapper.Throwable: javax.ejb.EJBException: org.jboss.injection.manager.spi.InjectionException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: TestingDAO not bound]]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:183) [:0.0.1]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:251) [:0.0.1]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
              at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:323) [:1.7.17]
              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:380) [:1.7.17]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalContainerInvocation.invokeTarget(SessionLocalProxyInvocationHandler.java:184) [:1.0.11]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalInvokableContextHandler.invoke(SessionLocalProxyInvocationHandler.java:159) [:1.0.11]
              at $Proxy140.invoke(Unknown Source)    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
              at $Proxy139.testCDI(Unknown Source)    at org.example.servlets.TestingServlet.init(TestingServlet.java:40) [:]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1208) [:6.0.0.Final]
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1108) [:6.0.0.Final]
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3628) [:6.0.0.Final]
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3851) [:6.0.0.Final]
              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.0.0.Final]
              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]
              at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477) [:6.0.0.Final]
              at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.Final]
              at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.Final]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.GA]
              at $Proxy41.start(Unknown Source)    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.GA]
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [: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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [: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.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:103) [jboss-kernel.jar:2.2.0.GA]
              at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.install(Ejb3McRegistrar.java:394) [:1.0.2]
              at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.bind(Ejb3McRegistrar.java:245) [:1.0.2]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.registerProxyFactory(JndiSessionRegistrarBase.java:1169) [:1.0.11]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.createJndiReferenceBindingSet(JndiSessionRegistrarBase.java:510) [:1.0.11]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:156) [:1.0.11]
              at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:223) [:1.7.17]
              at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:725) [:1.7.17]
              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:1105) [:1.7.17]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              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.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:722) [:1.7.0]
          Caused by: org.jboss.injection.manager.spi.InjectionException: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: TestingDAO 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.weld.integration.injection.Jsr299InterceptorInjector.inject(Jsr299InterceptorInjector.java:73) [:6.0.0.Final]
              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.stateless.StatelessContainer.createBeanContext(StatelessContainer.java:139) [:1.7.17]
              at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:94) [:1.7.17]
              at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:81) [:1.7.17]
              at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62) [:1.7.17]
              at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57) [:1.7.17]
              at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54) [:1.7.17]
              at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86) [:1.7.17]
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.17]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]
              ... 135 more
          Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: TestingDAO 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:411) [:1.7.0]
              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]
              ... 158 more
          Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: TestingDAO 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:688) [:5.0.5.Final]
              at javax.naming.InitialContext.lookup(InitialContext.java:411) [:1.7.0]
              at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [:5.0.5.Final]
              ... 165 more
          Caused by: javax.naming.NameNotFoundException: TestingDAO 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:396) [: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:411) [:1.7.0]
              at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [:5.0.5.Final]
              ... 169 more
          
          2011-07-01 23:57:44,756 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CDITest]] (Thread-2) Servlet /CDITest threw load() exception: javax.naming.NameNotFoundException: TestingDAO 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:396) [: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:411) [:1.7.0]
              at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [: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:688) [:5.0.5.Final]
              at javax.naming.InitialContext.lookup(InitialContext.java:411) [:1.7.0]
              at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1350) [: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:411) [:1.7.0]
              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]
              at org.jboss.injection.manager.core.DefaultInjectionContext.proceed(DefaultInjectionContext.java:58) [:1.0.0-alpha-6]
              at org.jboss.weld.integration.injection.Jsr299InterceptorInjector.inject(Jsr299InterceptorInjector.java:73) [:6.0.0.Final]
              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.stateless.StatelessContainer.createBeanContext(StatelessContainer.java:139) [:1.7.17]
              at org.jboss.ejb3.pool.AbstractPool.createBeanContext(AbstractPool.java:94) [:1.7.17]
              at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:81) [:1.7.17]
              at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:62) [:1.7.17]
              at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:57) [:1.7.17]
              at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:54) [:1.7.17]
              at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:86) [:1.7.17]
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.17]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:247) [:0.0.1]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]
              at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
              at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:323) [:1.7.17]
              at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:380) [:1.7.17]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalContainerInvocation.invokeTarget(SessionLocalProxyInvocationHandler.java:184) [:1.0.11]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143) [:1.7.17]
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
              at org.jboss.ejb3.proxy.impl.handler.session.SessionLocalProxyInvocationHandler$LocalInvokableContextHandler.invoke(SessionLocalProxyInvocationHandler.java:159) [:1.0.11]
              at $Proxy140.invoke(Unknown Source)    at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
              at $Proxy139.testCDI(Unknown Source)    at org.example.servlets.TestingServlet.init(TestingServlet.java:40) [:]
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1208) [:6.0.0.Final]
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1108) [:6.0.0.Final]
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3628) [:6.0.0.Final]
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3851) [:6.0.0.Final]
              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.0.0.Final]
              at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]
              at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477) [:6.0.0.Final]
              at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.Final]
              at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.Final]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]
              at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]
              at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]
              at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]
              at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.GA]
              at $Proxy41.start(Unknown Source)    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.GA]
              at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [: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.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [: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.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:103) [jboss-kernel.jar:2.2.0.GA]
              at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.install(Ejb3McRegistrar.java:394) [:1.0.2]
              at org.jboss.ejb3.common.registrar.plugin.mc.Ejb3McRegistrar.bind(Ejb3McRegistrar.java:245) [:1.0.2]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.registerProxyFactory(JndiSessionRegistrarBase.java:1169) [:1.0.11]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.createJndiReferenceBindingSet(JndiSessionRegistrarBase.java:510) [:1.0.11]
              at org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase.bindEjb(JndiSessionRegistrarBase.java:156) [:1.0.11]
              at org.jboss.ejb3.session.SessionContainer.lockedStart(SessionContainer.java:223) [:1.7.17]
              at org.jboss.ejb3.session.SessionSpecContainer.lockedStart(SessionSpecContainer.java:725) [:1.7.17]
              at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:1105) [:1.7.17]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]
              at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]
              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.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:722) [:1.7.0]
          
          2011-07-01 23:57:44,781 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (Thread-2) Binding the following Entries in Global JNDI:
          
              EARPackaging/TestingDAO/local - EJB3.x Default Local Business Interface
              EARPackaging/TestingDAO/local-org.example.dao.TestingDAO - EJB3.x Local Business Interface
          
          2011-07-01 23:57:44,783 WARN  [org.jboss.ejb3.TimerServiceContainer] (Thread-2) EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
          

           

          The interesting fact is, that not all the time at booting I get it, but most of time I do. Something happens, but I don't know why (at least now). My project (not this one, but real one), I have dozens of services and daos, so now I at least know why all the time I see NameNotFoundException, but I see different DAOs not bound.

           

          Maybe any ideas?

          • 2. Re: Enabling CDI in EAR (specifically in ejb part of ear)
            Maxym Pendyshchuk Newbie

            My next observation: just downloaded JBoss 7.0 CR1, and deployed my simple project there (project added to my previous post here), and everything started well, no exceptions. Should I think that the issue I was faced using JBoss 6.0 is its bug?

            • 3. Re: Enabling CDI in EAR (specifically in ejb part of ear)
              jaikiran pai Master

              It looks like a known bug in AS6. I haven't the read the details of the post yet. Will look at it later over the weekend. But it looks like it's this issue https://issues.jboss.org/browse/EJBTHREE-2227

              • 4. Re: Enabling CDI in EAR (specifically in ejb part of ear)
                Maxym Pendyshchuk Newbie

                Thank you for reply!

                 

                Maybe these issues are related, at first look we have the same exception, but completely different ways to reproduce it. I don't use @Startup and @Singleton annotations at least in project I've created to show my problem, I get this kind of problem only when I add beans.xml to my ejb-jar

                • 5. Re: Enabling CDI in EAR (specifically in ejb part of ear)
                  jaikiran pai Master

                  Looks like a load-on-startup servlet. Do you have one?

                  • 6. Re: Enabling CDI in EAR (specifically in ejb part of ear)
                    Maxym Pendyshchuk Newbie

                    Yes, it is. Probably I forgot to mention that. When server is booting I have to fetch some data, so I use Servlet (since data is needed by presentation; sort of cache), which performs this operation. But ejb part is not "ready" to perform its job, when Servlet is asking it.