NullPointerException at org.springframework.faces.webflow.FlowViewStateManager.saveView

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(Phase.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) ....

出现这个异常的原因是用了spring-faces 2.3.0的包,

这个异常在2.3.1已经得到修复, 到目前为止最新的版本是2.3.2.RELEASE

已经测试过,最新版的jar没有问题


JSF 异常:could not find Factory: javax.faces.context.FacesContextFactory

解决办法:

在web.xml中添加监听:

<listener>
      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  </listener>

你可能感兴趣的:(NullPointerException at org.springframework.faces.webflow.FlowViewStateManager.saveView)