geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: OWB is always enabled even no web beans in the web application
Date Thu, 11 Nov 2010 17:06:02 GMT
There's definitely a bug.... possibly several.

I'd like to know exactly what isn't getting initialized that causes this error.  On the other
hand if there's no beans.xml we really shouldn't be installing any webbeans functionality.
 On the third hand :-)  we don't really know how much of an ee application is supposed to
be "covered" by a single owb context so I'm unsure of some details about how to decide when
to install owb stuff.  I'm hoping to catch pete muir to ask him about this...

thanks
david jencks

On Nov 10, 2010, at 11:57 PM, Ivan wrote:

> Hi,
>     I found some jsf and ejb cases failed with the exception below, and apparently, no
web beans is used in those application, suppose that all the OWB related codes should not
be executed.  After checking the integration codes, I found something like in the OpenWebBeansWebInitializer
:
>     --->
>     servletContext.setAttribute(OpenWebBeansConfiguration.PROPERTY_OWB_APPLICATION, "true");
>     <---
>     Seems that OWB uses this to identify whether the current application is an OWB application.
 But the set action is always executed even no web bean exists in the application. So is there
a bug here ?
> thanks.
> 
>     2010-11-11 14:35:46,515 ERROR [ErrorPageWriter] An exception occurred
> javax.faces.FacesException: javax.enterprise.context.ContextNotActiveException: WebBeans
context with scope type annotation @RequestScoped does not exist within current thread
>     at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
>     at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
>     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>     at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:725)
>     at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>     at org.apache.geronimo.tomcat.valve.ProtectedTargetValve.invoke(ProtectedTargetValve.java:53)
>     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
>     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
>     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
>     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
>     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
>     at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:243)
>     at org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:373)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
>     at java.lang.Thread.run(Thread.java:736)
> Caused by: javax.enterprise.context.ContextNotActiveException: WebBeans context with
scope type annotation @RequestScoped does not exist within current thread
>     at org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:309)
>     at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:124)
>     at org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:95)
>     at org.apache.webbeans.conversation.ConversationImpl_$$_javassist_3.isTransient(ConversationImpl_$$_javassist_3.java)
>     at org.apache.webbeans.jsf.WebBeansPhaseListener.beforePhase(WebBeansPhaseListener.java:93)
>     at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76)
>     at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:159)
>     ... 21 more
> 
> -- 
> Ivan


Mime
View raw message