Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Session invalidate problems

843840Aug 16 2007 — edited Aug 17 2007
Hi

I have a web app using tomcat 5.x and JSP. The user can enter form data into index.jsp and carry out a search of a db. From the results page (a plain html file generated by a java class) there is the option to start a new search. To do this at the start of index.jsp i invalidate the session (so the user doesn't get the results from the previous search) and start a new session. The problem is that when the user clicks new search from the results page i get a null pointer exception for index.jsp
java.lang.NullPointerException
	db.Handle.runSQLquery(Handle.java:143)
	db.RetrieveAdducts.getDBAdducts(RetrieveAdducts.java:55)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:177)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
I have no idea why this is the error is intermittent and only occurs sometime usually after two searches but it could be more. I also sometimes have to restart the web server to get index.jsp to display again.

Im really stuck and would appreciate any help.
Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2007
Added on Aug 16 2007
7 comments
266 views