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中提到的第一页,但是出现了以下错误。
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中只有最少的代码
请参阅此post以获取上下文链接
一些事实:
- 根据您在其他问题中的堆栈跟踪中Tomcat特定类的外观,您正在使用Tomcat。
- 根据JSF 2.1的外观介绍了当前问题中stacktrace中的
FacesContext#isReleased()
方法,你使用的是JSF 2.1。 - 根据你的另一个问题的答案 ,你可能正在使用Mojarra 2.1.0。
- Mojarra 2.1.0在Tomcat / Jetty中不起作用 ,因为在没有内置注释扫描器的容器的注释扫描实现中意外引入Glassfish特定代码的一个重大错误 。
因此,要解决这个问题,有几种选择:
- 降级至Mojarra 2.0.5。
- 升级到Mojarra 2.1.1。
- 用Glassfish 3,JBoss AS 6或其他东西替换Tomcat。
你在用Tomcat吗? 如果是这样,根据这个post,将JSF版本从2.1.0恢复到最新的2.0.x稳定版本。
- 使用Sharpen和eclipse:错误“应用程序”sharpen.core.application“无法在注册表中找到。”
- 正则表达式Java单词上下文
- 在Swing中绘制组件顶部?
- JVM(HotSpot):所有方法都去哪儿了? 方法区? 本机方法堆栈?
- Java – 将JTextArea中的字符串转换为图像
- Collections.binarySearch(列表,K键)澄清。 Java的
- 如何使用Eclipse外部工具配置启动进程
- IntelliJ和JSP / JSTL无法在tomcat7中解析JSTL的taglib
- jre8中URLPermission处的IllegalArgumentException