Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

500 Error after requesting a JSP after a long time

 
Shridhar Raghavan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I get the following exception when i request the same JSP after a long time has elapsed. Restarting the server resolves the issue. I wanted to know when can this occur.
The duration between two requests is usually around 24 hours. Does that have anything to do with it? Or is it a memory issue?


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


root cause

java.lang.NullPointerException
org.apache.jsp.index_jsp._jspService(index_jsp.java:169)
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shridhar Raghavan wrote:root cause

java.lang.NullPointerException
org.apache.jsp.index_jsp._jspService(index_jsp.java:169)

There's your problem. If you're using Tomcat, go to the main Tomcat folder, then sub folder work\Catalina\localhost\XXX\org\apache\jsp with XXX being the web application's name. You may need to replace localhost with the actual host if you're using a different one.

Inside look for file index_jsp.java. This file is generated automatically from your index.jsp file. Look for line 169; something on that line may be null at times. You should recognize this line as one from your original index.jsp file. That's where you should look at.
 
Scott Paffrath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My money is on an expired session attribute that is null.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic