I started a project with JSF 2.1, Spring 3.0.5, Spring Web Flow 2.3.0 in Tomcat 7.0.22. When I put SWF JAR files (binding, faces, js, js.resources and webflow) in classpath, I can't to navigate to any page and I get this:
SEVERE: Error Rendering View[/login.xhtml]
java.lang.NullPointerException
at org.springframework.faces.webflow.FlowViewStateManager.saveView(FlowViewStateManager.java:181)
at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:418)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
at com.sun.faces.lifecycle.Phase.doPhase(P开发者_运维技巧hase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) ....
When I delete those JAR files, then all pages will be rendered correctly. How is this caused and how can I solve it?
This is a bug in SWF. See also SWF issue 1461. It's been fixed in SWF 2.3.1. So, upgrading to SWF 2.3.1 should solve this problem.
精彩评论