Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chain.doFilter(req, resp); is throwing a null pointer exception

Status
Not open for further replies.

liorza

Programmer
Mar 3, 2004
27
US
Can anyone please explain what are potential reasons for receiving Null pointer exception from
Chain.do(…) call (within a filter)

I have two filters that are defined in my web.xml
Code:
<filter>
		<filter-name>HibernatePersistence</filter-name>
		<display-name>HibernatePersistence</display-name>
		<filter-class>
			com.regence.mxp.servlet.filter.HibernatePersistence
		</filter-class>
	</filter>
	<filter>
		<filter-name>WebPerformanceLogging</filter-name>
		<display-name>WebPerformanceLogging</display-name>
		<description>Web page performance logger</description>
		<filter-class>
			com.regence.mxp.web.filter.WebPerformanceLogginFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>HibernatePersistence</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>WebPerformanceLogging</filter-name>
		<url-pattern>*.do</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>WebPerformanceLogging</filter-name>
		<url-pattern>*.html</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>WebPerformanceLogging</filter-name>
		<url-pattern>*.jsp</url-pattern>
	</filter-mapping>
	<filter-mapping>
		<filter-name>WebPerformanceLogging</filter-name>
		<url-pattern>*.htm</url-pattern>
	</filter-mapping>
When the second filter (WebPerformanceLogging) is calling the chain.do(…) I am getting back
Code:
12:671 PDT] 6943e414 WebGroup      E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
	at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:441)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
	at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
	at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
	at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
	at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
	at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
	at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)

Thanks Lior
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top