1

i am getting below exception and tomcat hangs and my services are down.

SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at org.apache.jsp.search_005fresult_jsp._jspService(search_005fresult_jsp.java:86)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:276)
    at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:81)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:517)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
    at java.lang.Thread.run(Thread.java:619)
Sep 29, 2010 2:57:17 PM org.apache.catalina.core.ApplicationC
JoseK
  • 31,141
  • 14
  • 104
  • 131
Ashish Yadav
  • 7
  • 1
  • 1
  • 6
  • 15
    [Stop](http://stackoverflow.com/questions/3177733/howto-avoid-java-code-in-jsp-files) writing Java code in JSP and it'll improve your life as developer. – BalusC Oct 01 '10 at 11:42

5 Answers5

6

You are trying to call a method on an object that is null

See, on line 86 of:

/path/to/tomcat/work/Catalina/localhost/yourAppName/org/apache/jsp/search_005fresult_jsp.java

Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
0

The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application

0

you are referencing a variable that is null in your search_005fresult.jsp which is causing an error in the compiled servlet file on line 86.

I would use a debugger and step through to find where the null variable is, or just look at the jsp it should relatively obvious.

NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
0

I think you need to consider what you are doing at this line where the nullpointer is located.

I just had a similar issue where there is a ServletContextListener that stores a object that I tried to access later on - but when the server was restarted the contextInitialized where the object is set was not called - so I had a similar nullpointer when I tried accessing the object that was no longer there.

Jontas
  • 409
  • 3
  • 12
-1

open this file tomcat/work/Catalina/localhost/yourAppName/org/apache/jsp/search_005fresult_jsp.java and then go to line no 86. check object or String variable , use not null check . ex. if(Object!=null){ //use this .. //your code }

Ashish Yadav
  • 7
  • 1
  • 1
  • 6