javax.faces.context.FacesContext.isReleased(FacesContext.java:609)中的java.lang.UnsupportedOperationException [英] java.lang.UnsupportedOperationException at javax.faces.context.FacesContext.isReleased(FacesContext.java:609)
本文介绍了javax.faces.context.FacesContext.isReleased(FacesContext.java:609)中的java.lang.UnsupportedOperationException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在整合SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1。
我能够点击我在Spring web-flow xml中提到的第一页,但收到以下错误。
I am integrating SWF 2.2.1,Primefaces 2.2.1,JSF 2,Spring Security 3,Spring 3.1.0M1. I am able to hit my first page mentioned in Spring web-flow xml, but getting following error.
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中只有最少的代码
And to my surprise I only have minimal code in my .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
Please see this post also for the context link
推荐答案
一些事实:
- 根据堆栈跟踪中的Tomcat特定类的出现您的其他问题。
- 根据JSF 2.1的外观介绍
当前问题中stacktrace中的FacesContext#isReleased()
方法,您正在使用JSF 2.1。 - 根据答案在你的另一个问题中,你可能正在使用Mojarra 2.1.0。
- Mojarra 2.1.0由于Tomcat / Jetty 无法正常工作一个重大错误意外地在容器的注释扫描实现中引入了Glassfish特定代码不附带内置注释扫描仪。
- According to the appearance of Tomcat specific classes in the stacktrace in your other question you're using Tomcat.
- According to the appearance of the JSF 2.1 introduced
FacesContext#isReleased()
method in the stacktrace in your current question, you're using JSF 2.1. - According to the answer in your other question, you're probably using Mojarra 2.1.0.
- Mojarra 2.1.0 does not work in Tomcat/Jetty due to a major mistake of accidently introducing Glassfish specific code in the annotation scanning implementation for containers which does not ship with builtin annotation scanners.
因此,要解决此问题,有几种选择:
So, to solve this problem there are several options:
- 降级至Mojarra 2.0.5。
- 升级至Mojarra 2.1.1。
- 替换Tomcat by Glassfish 3,JBoss AS 6或其他。
这篇关于javax.faces.context.FacesContext.isReleased(FacesContext.java:609)中的java.lang.UnsupportedOperationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文