aspose file tools*
The moose likes JSP and the fly likes 500 Error after requesting a JSP after a long time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "500 Error after requesting a JSP after a long time" Watch "500 Error after requesting a JSP after a long time" New topic
Author

500 Error after requesting a JSP after a long time

Shridhar Raghavan
Ranch Hand

Joined: May 27, 2010
Posts: 71
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

Joined: Oct 27, 2005
Posts: 19761
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Scott Paffrath
Greenhorn

Joined: Aug 27, 2010
Posts: 4
My money is on an expired session attribute that is null.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: 500 Error after requesting a JSP after a long time