0

With our software we were using myfaces 1 with 2 filters implemented.. first was /jsf and other was /1 with its mapped classes in web.xml file. It works fine with myfaces 1 but when we have upgraded myfaces version from 1 to 2 on each page in the web application we have started getting null pointer error.

java.lang.NullPointerException at org.apache.myfaces.context.MyFacesExceptionHandlerWrapperImpl.handle(MyFacesExceptionHandlerWrapperImpl.java:202) at javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:64) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:261) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.calendra.portal.SessionFilter.doFilter(SessionFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.calendra.jsf.components.XSLFilter.doFilter(XSLFilter.java:92) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:131) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675) at java.lang.Thread.run(Thread.java:619)

In the jsp files I am redirecting to new page using dispatch method as below context.getExternalContext().dispatch("/jsf/1/stdportal/login.jsp");

When I remove /jsf from above dispatch method's argument I dont get any problem, every thing works fine... but I want this to work with /jsf as well..**.

My Application Server is Tomcat 6 and Java version is 6.

Thanks in Advance Akshay

Akshay
  • 85
  • 7

1 Answers1

0

Looks like an exception in the MyFaces exception handler. So I guess that the exception you are seeing is caused by the fact the MyFaces fails to handle some other exception.

You could try to disable the MyFaces error handling to see if it reveal the original problem:

<context-param>
  <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
  <param-value>false</param-value>
</context-param>
chkal
  • 5,598
  • 21
  • 26
  • In this case you should try to set a breakpoint at the corresponding location. Perhaps you can find out what is the root cause of the error this way. – chkal Jul 05 '12 at 17:14