File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes HELP with  java.lang.NullPointerException on doFilter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HELP with  java.lang.NullPointerException on doFilter" Watch "HELP with  java.lang.NullPointerException on doFilter" New topic
Author

HELP with java.lang.NullPointerException on doFilter

gaston e lopez
Greenhorn

Joined: Feb 21, 2012
Posts: 3
HI, I need some helo with this. I cant resolve.

I have the next error: javax.servlet.ServletException: java.lang.NullPointerException inside a method doFilter.
I dont know what else to do... I cant find the error.

org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:508)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:415)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
negocio.DAO.Hibernation.doFilter(Hibernation.java:126)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
Which version of struts you are using.. ??

Please provide more details on it..

If possible provide your configuration file and source code..
gaston e lopez
Greenhorn

Joined: Feb 21, 2012
Posts: 3
Yes!.

Struts version: 1.1
I use this controller:

and this plugins:



I have a class Hibernation.java with a method doFilter where the error is produced:

This is the method:

 
Consider Paul's rocket mass heater.
 
subject: HELP with java.lang.NullPointerException on doFilter
 
Similar Threads
encountered exception: Error loading object from URL , while loading subreport
Error on RequestProcessor using cluster
Null Pointer Execption error when running application
connectio null problem
org.apache.jasper.JasperException: java.util.ConcurrentModificationException