I am using IBM Websphere 8.0. We are trying to create the ear archive with all our CDI beans packaged in JAR directly in the ear file. The war manifest lists down the names of the jars packaged.
My issue is that I see a this stacktrace even though the application seems to have worked
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:321)
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_0.isTransient(ConversationImpl_$$_javassist_0.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)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
I am having a tough time comprehending it. As soon as I move the jars back into WEB-INF/lib, the application works fine again without this stacktrace in SystemOut logs. Could someone please shed some light or even direct me to any article on CDI and Classloader specifially if there is a Classloader heirarchy like in IBM.
My application is using PARENT_FIRST class loading for the application with a war class loader policy of PARENT_FIRST and a classloader per war. Any Help would be greatly appreciated