我正在整合SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1。 我可以点击Spring web-flow xml中提到的第一页,但是会出现以下错误。
com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException
SEVERE: Error Rendering View[/WEB-INF/flows/AccSrch/searchAccIns.xhtml]
java.lang.UnsupportedOperationException
at javax.faces.context.FacesContext.isReleased(FacesContext.java:609)
at com.sun.faces.context.PartialViewContextImpl.updateFacesContext(PartialViewContextImpl.java:468)
at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(PartialViewContextImpl.java:108)
at javax.faces.context.PartialViewContextWrapper.isAjaxRequest(PartialViewContextWrapper.java:117)
at javax.faces.component.UIViewRoot.getRendersChildren(UIViewRoot.java:1020)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1755)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
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 org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80)
at org.springframework.faces.webflow.JsfView.render(JsfView.java:90)
令我惊讶的是,我的.xhtml中只有最少的代码
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:define name="content">
<f:view>
<h:form id="expire" prependId="false">
<h:outputText value="HEllo" />
</h:form>
</f:view>
</ui:define>
</ui:composition>
请参阅此帖子以了解相关情况 link
答案 0 :(得分:6)
一些事实:
FacesContext#isReleased()
方法的外观,您使用的是JSF 2.1。因此,要解决这个问题,有几种选择:
答案 1 :(得分:2)
您使用的是Tomcat吗?如果是这样,根据this线程,将JSF版本从2.1.0恢复到最新的2.0.x稳定版本。