org.jboss.weld.context.NonexistentConversationException 呈现错误页面时
org.jboss.weld.context.NonexistentConversationException while rendering error page
我正在使用 omnifaces FullajaxExceptionHandler 来捕获 ViewExpiredExceptions。它在大多数页面上都能正常工作,但在我进行对话时却不行。
显然,处理程序捕获了 ViewExpiredException,尝试使用 error-page 的内容重新呈现页面,但由于页面的 header 包含
<meta name="cid" content="1" />
我在呈现错误页面时遇到错误:
09:48:04,169 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-10) Error Rendering View[/error-pages/session-expired.xhtml]: org.jboss.weld.context.NonexistentConversationException: WELD-000321: No conversation found to restore for id 1
at org.jboss.weld.context.AbstractConversationContext.initialize(AbstractConversationContext.java:259) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.http.LazyHttpConversationContextImpl.initialize(LazyHttpConversationContextImpl.java:90) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.http.LazyHttpConversationContextImpl.checkContextInitialized(LazyHttpConversationContextImpl.java:124) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:461) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.jsf.ConversationAwareViewHandler.getActionURL(ConversationAwareViewHandler.java:111) [weld-core-jsf-2.2.14.Final.jar:2015-06-24 15:18]
at javax.faces.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:189) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:250) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:143) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:864) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.context.PartialViewContextImpl.renderAll(PartialViewContextImpl.java:455) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:313) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60) [primefaces-5.2.jar:5.2]
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.renderErrorPageView(FullAjaxExceptionHandler.java:327) [omnifaces-1.8.1.jar:1.8.1-20140603]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handleAjaxException(FullAjaxExceptionHandler.java:240) [omnifaces-1.8.1.jar:1.8.1-20140603]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handle(FullAjaxExceptionHandler.java:176) [omnifaces-1.8.1.jar:1.8.1-20140603]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:654) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100) [primefaces-5.2.jar:5.2]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:205) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:198) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:195) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:108) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:41) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:268) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:188) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at be.fgov.economie.meldpunt.frontoffice.utils.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:24) [classes:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access[=12=]0(ServletInitialHandler.java:80) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:172) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.HttpServerExchange.run(HttpServerExchange.java:774) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
知道如何禁用此对话吗?我尝试添加 "nocid=true"
<error-page>
<exception-type>javax.enterprise.context.NonexistentConversationException</exception-type>
<location>/error-pages/session-expired.xhtml?nocid=true</location>
</error-page>
但由于它只是部分重新渲染,我想它没有被考虑在内。
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:250) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
堆栈跟踪表明错误页面包含一个需要对其 URL 进行编码的表单,而该表单又需要查询对话范围以获取对话 ID 并将其包含在 URL 中。
错误页面首先不能有 JSF 表单。首先,错误页面通常从 /WEB-INF
提供,并且此路径将在表单操作 URL 中结束。您不能向 URL 发送回发请求。这与错误页面是由 ajax 还是常规请求触发无关。
如果这些表单确实用于导航,请改为使用 GET 链接。
如果我们同时在jsf中使用prime face pollorg.jboss.weld.context.NonexistentConversationException怎么处理
for (Iterator<ExceptionQueuedEvent> iter = getUnhandledExceptionQueuedEvents()
.iterator(); iter.hasNext();) {
Throwable throwable = iter.next().getContext().getException();
Throwable exception = getHandlableRootCause((Throwable) throwable);
switch (exception.getClass().getName()) {
case org.jboss.weld.context.NonexistentConversationException:
bean.setKeepAlive((long) 1000);
facesContext.renderResponse();
iter.remove();
MBeanUtil.refreshPage();
bean.setKeepAlive((long) 15);
break;
}
}
这样正确吗
我正在使用 omnifaces FullajaxExceptionHandler 来捕获 ViewExpiredExceptions。它在大多数页面上都能正常工作,但在我进行对话时却不行。
显然,处理程序捕获了 ViewExpiredException,尝试使用 error-page 的内容重新呈现页面,但由于页面的 header 包含
<meta name="cid" content="1" />
我在呈现错误页面时遇到错误:
09:48:04,169 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (default task-10) Error Rendering View[/error-pages/session-expired.xhtml]: org.jboss.weld.context.NonexistentConversationException: WELD-000321: No conversation found to restore for id 1
at org.jboss.weld.context.AbstractConversationContext.initialize(AbstractConversationContext.java:259) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.http.LazyHttpConversationContextImpl.initialize(LazyHttpConversationContextImpl.java:90) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.http.LazyHttpConversationContextImpl.checkContextInitialized(LazyHttpConversationContextImpl.java:124) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.context.AbstractConversationContext.getCurrentConversation(AbstractConversationContext.java:461) [weld-core-impl-2.2.14.Final.jar:2015-06-24 15:18]
at org.jboss.weld.jsf.ConversationAwareViewHandler.getActionURL(ConversationAwareViewHandler.java:111) [weld-core-jsf-2.2.14.Final.jar:2015-06-24 15:18]
at javax.faces.application.ViewHandlerWrapper.getActionURL(ViewHandlerWrapper.java:189) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:250) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.renderkit.html_basic.FormRenderer.encodeBegin(FormRenderer.java:143) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:864) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.context.PartialViewContextImpl.renderAll(PartialViewContextImpl.java:455) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:313) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:60) [primefaces-5.2.jar:5.2]
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:1004) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:430) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.renderErrorPageView(FullAjaxExceptionHandler.java:327) [omnifaces-1.8.1.jar:1.8.1-20140603]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handleAjaxException(FullAjaxExceptionHandler.java:240) [omnifaces-1.8.1.jar:1.8.1-20140603]
at org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handle(FullAjaxExceptionHandler.java:176) [omnifaces-1.8.1.jar:1.8.1-20140603]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:654) [jboss-jsf-api_2.2_spec-2.2.11.jar:2.2.11]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100) [primefaces-5.2.jar:5.2]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:205) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:198) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:195) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:108) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler.handleResult(HttpRewriteResultHandler.java:41) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.rewrite(RewriteFilter.java:268) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at org.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:188) [rewrite-servlet-2.0.12.Final.jar:2.0.12.Final]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at be.fgov.economie.meldpunt.frontoffice.utils.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:24) [classes:]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261) [spring-web-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access[=12=]0(ServletInitialHandler.java:80) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleRequest(ServletInitialHandler.java:172) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at io.undertow.server.HttpServerExchange.run(HttpServerExchange.java:774) [undertow-core-1.2.8.Final.jar:1.2.8.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_01]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_01]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_01]
知道如何禁用此对话吗?我尝试添加 "nocid=true"
<error-page>
<exception-type>javax.enterprise.context.NonexistentConversationException</exception-type>
<location>/error-pages/session-expired.xhtml?nocid=true</location>
</error-page>
但由于它只是部分重新渲染,我想它没有被考虑在内。
at com.sun.faces.renderkit.html_basic.FormRenderer.getActionStr(FormRenderer.java:250) [jsf-impl-2.2.11-jbossorg-1.jar:2.2.11-jbossorg-1]
堆栈跟踪表明错误页面包含一个需要对其 URL 进行编码的表单,而该表单又需要查询对话范围以获取对话 ID 并将其包含在 URL 中。
错误页面首先不能有 JSF 表单。首先,错误页面通常从 /WEB-INF
提供,并且此路径将在表单操作 URL 中结束。您不能向 URL 发送回发请求。这与错误页面是由 ajax 还是常规请求触发无关。
如果这些表单确实用于导航,请改为使用 GET 链接。
如果我们同时在jsf中使用prime face pollorg.jboss.weld.context.NonexistentConversationException怎么处理
for (Iterator<ExceptionQueuedEvent> iter = getUnhandledExceptionQueuedEvents()
.iterator(); iter.hasNext();) {
Throwable throwable = iter.next().getContext().getException();
Throwable exception = getHandlableRootCause((Throwable) throwable);
switch (exception.getClass().getName()) {
case org.jboss.weld.context.NonexistentConversationException:
bean.setKeepAlive((long) 1000);
facesContext.renderResponse();
iter.remove();
MBeanUtil.refreshPage();
bean.setKeepAlive((long) 15);
break;
}
}
这样正确吗