]
Marcel Kolsteren updated JBAS-8511:
-----------------------------------
Attachment: bean-manager-provider-problem.zip
Maven project for generating the example web application.
failing JNDI lookup for java:comp/BeanManager in M5
---------------------------------------------------
Key: JBAS-8511
URL:
https://jira.jboss.org/browse/JBAS-8511
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Weld/CDI
Affects Versions: 6.0.0.M5
Reporter: Marcel Kolsteren
Assignee: Marius Bogoevici
Attachments: bean-manager-provider-problem.zip
A simple web application, which includes the Seam Faces module (3.0.0.Alpha3), works in
JBoss AS 6.0.0.M4, but fails in JBoss AS 6.0.0.M5. This is probably because of a problem
with looking up java:comp/BeanManager in JNDI.
The sample application, which can be generated with the Maven project in the attached zip
file, is a JSF application that contains one static page that shows "Hello
world!". After starting the application, surf to
http://localhost:8080/bean-manager-provider-problem/Index.jsf
In M4, the page shows, and in M5 you'll get the stack trace that is included at the
end of this description. I did some debugging, and saw that in M4, the bean manager can be
looked up correctly by DefaultJndiBeanManagerProvider. In M5, the lookup fails. At that
moment, the thread context classloader is WebCtxLoader$ENCLoader (thought that was
relevant because the contents of java:comp depend on the thread context class loader which
is active at the time of lookup).
By the way, the double listing of the weldx bean manager providers in the error message
is due to the fact that those providers are defined in 2 jars: in the weldx jar and in the
Seam Faces jar (according to Lincoln the additional include in the Seam faces jar was once
needed because of a bug in service provider loading).
======
23:20:10,853 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/bean-manager-provider-problem].[FacesServlet]]
Servlet.service() for servlet FacesServlet threw exception:
java.lang.IllegalStateException: Could not wrap ExternalContext
at
org.jboss.seam.faces.environment.SeamExternalContextFactory.getExternalContext(SeamExternalContextFactory.java:35)
[:3.0.0.Alpha3]
at
com.sun.faces.context.InjectionExternalContextFactory.getExternalContext(InjectionExternalContextFactory.java:109)
[:2.0.2-FCS]
at
com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)
[:2.0.2-FCS]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:302) [:2.0.2-FCS]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
[:6.0.0.20100911-M5]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
[:6.0.0.20100911-M5]
at
org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)
[:6.0.0.20100911-M5]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
[:6.0.0.20100911-M5]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
[:6.0.0.20100911-M5]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:68)
[:2010-08-30 15:40]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
[:6.0.0.20100911-M5]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
[:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[:6.0.0.20100911-M5]
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
[:6.0.0.20100911-M5]
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
[:1.1.0.CR3]
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
[:1.1.0.CR3]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
[:6.0.0.20100911-M5]
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
[:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
[:6.0.0.20100911-M5]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[:6.0.0.20100911-M5]
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
[:6.0.0.20100911-M5]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[:6.0.0.20100911-M5]
at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
[:6.0.0.20100911-M5]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[:6.0.0.20100911-M5]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[:6.0.0.20100911-M5]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
[:6.0.0.20100911-M5]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
[:6.0.0.20100911-M5]
at java.lang.Thread.run(Thread.java:637) [:1.6.0_20]
Caused by: java.lang.IllegalStateException: Could not locate a BeanManager from the
providers org.jboss.seam.faces.beanManager.FacesServletContextBeanManagerProvider(20),
org.jboss.weld.extensions.beanManager.DefaultJndiBeanManagerProvider(11),
org.jboss.weld.extensions.beanManager.DefaultJndiBeanManagerProvider(11),
org.jboss.weld.extensions.beanManager.JBossJndiBeanManagerProvider(10),
org.jboss.weld.extensions.beanManager.JBossJndiBeanManagerProvider(10)
at
org.jboss.weld.extensions.beanManager.BeanManagerAware.getBeanManager(BeanManagerAware.java:88)
[:1.0.0.Alpha2]
at
org.jboss.weld.extensions.beanManager.BeanManagerAccessor.getManager(BeanManagerAccessor.java:33)
[:1.0.0.Alpha2]
at
org.jboss.seam.faces.environment.SeamExternalContextFactory.getExternalContext(SeamExternalContextFactory.java:26)
[:3.0.0.Alpha3]
... 28 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: