TomEE サーバーで OpenJPA を使用しています。
.war をビルドしてサーバーにデプロイしますが、アプリケーションでページを開くと、次のような例外が発生します。
javax.servlet.ServletException: WebBeans context with scope type annotation @RequestScoped does not exist within current thread
javax.faces.webapp.FacesServlet.service(FacesServlet.java:229)
filters.NoCacheFilter.doFilter(NoCacheFilter.java:42)
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @RequestScoped does not exist within current thread
org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:351)
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualCreationalContext(NormalScopedBeanInterceptorHandler.java:169)
org.apache.webbeans.web.intercept.RequestScopedBeanInterceptorHandler.getContextualInstance(RequestScopedBeanInterceptorHandler.java:79)
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:114)
org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.invoke(NormalScopedBeanInterceptorHandler.java:108)
org.apache.webbeans.conversation.ConversationImpl_$$_javassist_0.isTransient(ConversationImpl_$$_javassist_0.java)
org.apache.webbeans.jsf.WebBeansPhaseListener.beforePhase(WebBeansPhaseListener.java:106)
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:77)
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:158)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
filters.NoCacheFilter.doFilter(NoCacheFilter.java:42)
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)