aspose file tools*
The moose likes Servlets and the fly likes null pointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "null pointer exception" Watch "null pointer exception" New topic

null pointer exception

gurudev arer

Joined: Apr 01, 2008
Posts: 6

The following exception is logged in my application log. When this exception occurs my application hangs and i need to bounce the server.
I am not able to find out why am i getting this error. Please help.

[color=red]SEVERE: Servlet.service() for servlet action threw exception
at org.apache.struts.action.ActionServlet.processActionForward(
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.jk.server.JkCoyoteHandler.invoke(
at org.apache.jk.common.HandlerRequest.invoke(
at org.apache.jk.common.ChannelSocket.invoke(
at org.apache.jk.common.ChannelSocket.processConnection(
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(
at org.apache.tomcat.util.threads.ThreadPool$
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Seems like problem with your configurations. can paste the relevant xml here

[Servlet tutorial] [Servlet 3.0 Cook Book]
gurudev arer

Joined: Apr 01, 2008
Posts: 6
Hi sudhir,
Thanks for the reply.
Here is the web.xml file

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"


<!-- Standard Action Servlet Configuration (with debugging) -->



<!-- Action Servlet Mapping -->

<!-- The Usual Welcome File List -->

<!-- Struts Tag Library Descriptors -->




sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Please use proper code tag. It makes code readable.

Do you know when the error comes up? I mean, which screen or URL is giving you this error?
Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

The problem is with your stuts mapping for some ActionForward.

Make sure the mapping.findForward("<forward name>") has a correct <forward name>

Try to give more info if that doesn't resolve the issue...

Java Experience
I agree. Here's the link:
subject: null pointer exception
Similar Threads
Issues with Jboss Application Server - Error received
Spring and Hessian
ServletException after JSP precompilation
File upload limit using tomcat