[weld-issues] [JBoss JIRA] (WELD-1020) NPE during cleanup after Servlet API3 AsyncContect
Klaus Wienert (Commented) (JIRA)
jira-events at lists.jboss.org
Tue Dec 27 09:49:09 EST 2011
[ https://issues.jboss.org/browse/WELD-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653162#comment-12653162 ]
Klaus Wienert commented on WELD-1020:
-------------------------------------
If the requested page is secured by a security-constraint I get the same NPE. In contrast this resource is not secured I do not get the Exception. At this point only the dependencies are included to the project and the listener is registered in web.xml.
pom.xml
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core</artifactId>
<version>1.1.4.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>1.1.4.Final</version>
</dependency>
web.xml
<listener>
<description>startup CDI</description>
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
</listener>
...
<security-constraint>
<display-name>Restrict XHTML Documents</display-name>
<web-resource-collection>
<web-resource-name>XHTML</web-resource-name>
<url-pattern>/pages/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>role</role-name>
</auth-constraint>
<user-data-constraint>
<description>SSL required</description>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
> NPE during cleanup after Servlet API3 AsyncContect
> --------------------------------------------------
>
> Key: WELD-1020
> URL: https://issues.jboss.org/browse/WELD-1020
> Project: Weld
> Issue Type: Bug
> Components: Servlet Container Support
> Affects Versions: 1.1.2.Final, 1.1.4.Final
> Environment: Windows7, Tomcat 7.0.23
> Reporter: Manuel Hartl
>
> When using Weld with Servlet API3.0 AsyncContext, there will be a NullPointerException, when Weld tries to cleanup the request.
> There seems to be a problem when asyncContext.complete() is called in a thread that was not the original thread that received the request
> example for the exception:
> java.lang.NullPointerException
> at org.jboss.weld.context.AbstractBoundContext.deactivate(AbstractBoundContext.java:71)
> at org.jboss.weld.context.http.HttpRequestContextImpl.deactivate(HttpRequestContextImpl.java:86)
> at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:103)
> at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.requestDestroyed(ForwardingServletListener.java:42)
> at org.apache.catalina.core.StandardContext.fireRequestDestroyEvent(StandardContext.java:5973)
> at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:283)
> at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1515)
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:523)
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1575)
> 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:662)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list