ContextNotActiveException running JCDI TCK
------------------------------------------
Key: GERONIMO-5896
URL: https://issues.apache.org/jira/browse/GERONIMO-5896
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: OpenWebBeans
Reporter: Kevan Miller
Fix For: 3.0
Running the JCDI tck can result in some exceptions like the following:
{code}
2011-04-09 23:53:45,964 ERROR [ApplicationContextTest]] Exception sending
context initialized event to listener instance of class
org.jboss.jsr299.tck.test\
s.context.application.TestServletContextListener
javax.enterprise.context.ContextNotActiveException: WebBeans context with scope
type annotation @ApplicationScoped does not exist within current thread
at
org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:341)
at
org.apache.webbeans.container.InjectableBeanManager.getContext(InjectableBeanManager.java:115)
at
org.jboss.jsr299.tck.tests.context.application.TestServletContextListener.contextInitialized(TestServletContextListener.java:38)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4521)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5004)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:4999)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
2011-04-09 23:53:45,965 ERROR [StandardContext] Error listenerStart
{code}
This is because the OpenWebBeans application initialization is not being
driven. Geronimo's WebBeansConfigurationListener
(plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/WebBeansConfigurationListener.java)
is (has become?) somewhat different from OpenWebBeans
WebBeansConfigurationListener). Namely, in
contextInitialized(ServletConextEvent) we don't have:
{code}
this.lifeCycle.startApplication(event);
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira