Bug 992988 - NPE in org.jboss.as.web.session.ClusteredSession.setAttribute
Summary: NPE in org.jboss.as.web.session.ClusteredSession.setAttribute
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Clustering
Version: 6.1.1,6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: TBD EAP 7
Assignee: Paul Ferraro
QA Contact: Jitka Kozana
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-05 11:02 UTC by Ladislav Thon
Modified: 2016-02-28 16:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 11:14:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EAP7-86 0 Critical Closed Graceful Shutdown and Quiescing 2016-08-04 00:48:55 UTC

Description Ladislav Thon 2013-08-05 11:02:25 UTC
Seen this NPE during EAP 6.1.1.ER4 testing:

07:37:54,026 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (ajp-perf18/10.16.90.54:8009-3) JBWEB000238: Exception sending request destroyed lifecycle event to listener instance of class org.jboss.weld.servlet.WeldListener: java.lang.NullPointerException
	at org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:866) [jboss-as-web-7.2.1.Final-redhat-5.jar:7.2.1.Final-redhat-5]
	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:17) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
	at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:12) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
	at org.jboss.weld.context.AbstractConversationContext.dissociate(AbstractConversationContext.java:157) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
	at org.jboss.weld.servlet.WeldListener.requestDestroyed(WeldListener.java:117) [weld-core-1.1.13.Final-redhat-1.jar:1.1.13.Final-redhat-1]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.1.Final-redhat-1.jar:7.2.1.Final-redhat-1]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

Only happened once during the entire test, see https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-failover-http-granular-undeploy-repl-async/9/console-perf18/

This looks very similar to bug 900549.

Comment 1 Radoslav Husar 2013-08-05 14:41:59 UTC
This is not duplicate of BZ 900549.

Comment 3 Jitka Kozana 2013-10-02 13:07:32 UTC
EAP 6.2.0.ER3.
The following stack trace is most likely the same error:
[JBossINF] [0m[31m22:02:35,053 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host]] (ajp-perf21/10.16.90.60:8009-109) JBWEB000233: Exception sending request initialized lifecycle event to listener instance of class org.jboss.weld.servlet.WeldListener: java.lang.NullPointerException
[JBossINF] 	at org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:864) [jboss-as-web-7.3.0.Final-redhat-6.jar:7.3.0.Final-redhat-6]
[JBossINF] 	at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:17) [weld-core-1.1.15.Final-redhat-1.jar:2013-09-20 09:50]
[JBossINF] 	at org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:12) [weld-core-1.1.15.Final-redhat-1.jar:2013-09-20 09:50]
[JBossINF] 	at org.jboss.weld.context.AbstractConversationContext.associate(AbstractConversationContext.java:127) [weld-core-1.1.15.Final-redhat-1.jar:2013-09-20 09:50]
[JBossINF] 	at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:145) [weld-core-1.1.15.Final-redhat-1.jar:2013-09-20 09:50]
[JBossINF] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:134) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]
[JBossINF] 	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
[JBossINF] 

This NPE was seen right after failover (graceful shutdown).
And here is the ugly NPE client is seeing:

Invalid response code: 500 Content: <html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000066: Exception report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>JBWEB000070: exception</b> <pre>java.lang.NullPointerException
	org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:864)
	org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
	org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:17)
	org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:12)
	org.jboss.weld.context.AbstractConversationContext.associate(AbstractConversationContext.java:127)
	org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:145)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
	org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488)
	org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
	java.lang.Thread.run(Thread.java:662)
</pre></p><p><b>JBWEB000072: note</b> <u>JBWEB000073: The full stack trace of the root cause is available in the JBoss Web/7.2.2.Final-redhat-1 logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>>
        org.jboss.smartfrog.loaddriver.RequestProcessingException: Invalid response code: 500 Content: <html><head><title>JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000066: Exception report</p><p><b>JBWEB000068: message</b> <u></u></p><p><b>JBWEB000069: description</b> <u>JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>JBWEB000070: exception</b> <pre>java.lang.NullPointerException
	org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:864)
	org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
	org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:17)
	org.jboss.weld.context.http.HttpConversationContextImpl.setSessionAttribute(HttpConversationContextImpl.java:12)
	org.jboss.weld.context.AbstractConversationContext.associate(AbstractConversationContext.java:127)
	org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:145)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
	org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:488)
	org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:420)
	org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
	java.lang.Thread.run(Thread.java:662)
</pre></p><p><b>JBWEB000072: note</b> <u>JBWEB000073: The full stack trace of the root cause is available in the JBoss Web/7.2.2.Final-redhat-1 logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.2.Final-redhat-1</h3></body></html>
	at org.jboss.smartfrog.loaddriver.http.HttpRequestProcessorFactoryImpl$HttpRequestProcessor.processRequest(HttpRequestProcessorFactoryImpl.java:158)
	at org.jboss.smartfrog.loaddriver.CompoundRequestProcessorFactoryImpl$CompoundRequestProcessor.processRequest(CompoundRequestProcessorFactoryImpl.java:52)
	at org.jboss.smartfrog.loaddriver.Runner.run(Runner.java:87)
	at java.lang.Thread.run(Thread.java:662)

See the full server log here:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-failover-http-session-shutdown-repl-async/96/artifact/report/config/jboss-perf21/server.log

Link to client log:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-failover-http-session-shutdown-repl-async/96/console-perf17/

Comment 5 Radoslav Husar 2013-12-11 09:13:31 UTC
If I am looking at the log right, the exception is thrown when the server is already shutting down. This is to be expected without support for graceful shutdown. Again, one way to solve is by mod_cluster session draining.

Comment 6 Radoslav Husar 2013-12-16 23:29:07 UTC
Graceful shutdown is not support in the affected version of EAP 6. The 
described behavior is to be expected.

The RFE to implement graceful shutdown is 
https://issues.jboss.org/browse/EAP6-7

Issues relating to HTTP can be avoided using mod_cluster and session 
draining prior to shutdown/undeploy.

Comment 7 Paul Ferraro 2014-05-21 13:26:14 UTC
This bug pertains to clean shutdown which is not scheduled to be implemented in EAP 6.x - and is targeted to be addressed in 7.0.  Setting resolution to WONTFIX.

Comment 9 Carlo de Wolf 2015-03-19 11:14:27 UTC
Moved to https://issues.jboss.org/browse/EAP7-86

Comment 10 JBoss JIRA Server 2015-08-11 01:40:02 UTC
Jason Greene <jason.greene> updated the status of jira EAP7-86 to Resolved

Comment 11 JBoss JIRA Server 2015-08-13 12:59:37 UTC
Radim Hatlapatka <rhatlapa> updated the status of jira EAP7-86 to Reopened

Comment 12 JBoss JIRA Server 2015-12-09 16:23:51 UTC
Jason Greene <jason.greene> updated the status of jira EAP7-86 to Resolved

Comment 13 JBoss JIRA Server 2015-12-16 13:13:03 UTC
Radim Hatlapatka <rhatlapa> updated the status of jira EAP7-86 to Reopened

Comment 14 JBoss JIRA Server 2016-02-28 16:47:39 UTC
Jason Greene <jason.greene> updated the status of jira EAP7-86 to Resolved


Note You need to log in before you can comment on or make changes to this bug.