You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rache <ra...@yahoo.com> on 2006/07/31 18:26:16 UTC

Servlet/session becoming null

I have this error occuring when loading a jsp:

2006-07-28 17:33:01 StandardWrapperValve[debugjsp]: Servlet.service() for
servlet debugjsp threw exception
java.lang.NullPointerException
	at
com.premier.ofa.core.TransactionSession.getAttribute(TransactionSession.java:34)
	at
com.premier.ofa.core.TransactionRequest.getConfigurationAttribute(TransactionRequest.java:125)
	at
com.premier.SignOn.UserInqAuthTaskBean.isFeatureConfigured(UserInqAuthTaskBean.java:366)
	at org.apache.jsp.jsp.security_jsp._jspService(security_jsp.java:1264)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

This happens on and off. In tracking the error, sometimes the session can be
null. Why is this happening?

Anyone familiar with this kind of exception?
Thanks!


-- 
View this message in context: http://www.nabble.com/Servlet-session-becoming-null-tf2028584.html#a5579120
Sent from the Tomcat - User forum at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Servlet/session becoming null

Posted by rache <ra...@yahoo.com>.
Hi Filip or anyone,

I got lost in this?:
"but your stack trace show TransactionSession, and it could be that your 
TransactionSession is holding a reference to the Tomcat session, 
but the reference it is actually holding is a facade object, and the 
facade loses it connection to the delegate, hence the facade method. 

Make sure you always get your reference to the session using the servlet 
API, and do NOT store a reference to it, as it is not the real session, 
just a facade object. "

Transactionsession holds a reference to the tomcat session. This
transactionsession object is part of a bean that is set in the response
object. Can the tomcatsession be lost somewhere?


-- 
View this message in context: http://www.nabble.com/Servlet-session-becoming-null-tf2028584.html#a5582709
Sent from the Tomcat - User forum at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Servlet/session becoming null

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
if you are saying the tomcat session is dropped then, two reasons could be:

1. the session cookie is dropped
2. the session has expired (been idle longer than your timeout setting)

but your stack trace show TransactionSession, and it could be that your 
TransactionSession is holding a reference to the Tomcat session,
but the reference it is actually holding is a facade object, and the 
facade loses it connection to the delegate, hence the facade method.

Make sure you always get your reference to the session using the servlet 
API, and do NOT store a reference to it, as it is not the real session, 
just a facade object.

Filip


rache wrote:
> I have this error occuring when loading a jsp:
>
> 2006-07-28 17:33:01 StandardWrapperValve[debugjsp]: Servlet.service() for
> servlet debugjsp threw exception
> java.lang.NullPointerException
> 	at
> com.premier.ofa.core.TransactionSession.getAttribute(TransactionSession.java:34)
> 	at
> com.premier.ofa.core.TransactionRequest.getConfigurationAttribute(TransactionRequest.java:125)
> 	at
> com.premier.SignOn.UserInqAuthTaskBean.isFeatureConfigured(UserInqAuthTaskBean.java:366)
> 	at org.apache.jsp.jsp.security_jsp._jspService(security_jsp.java:1264)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> This happens on and off. In tracking the error, sometimes the session can be
> null. Why is this happening?
>
> Anyone familiar with this kind of exception?
> Thanks!
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org