title: org.jboss.weld.context.NonexistentConversationException while rendering error page
body: <p>I'm using the omnifaces FullajaxExceptionHandler to catch ViewExpiredExceptions. It works fine on most pages, but not while i'm in a conversation.</p>
  
  <p>Apparantly the handler catches the ViewExpiredException, tries to rerender the page with the contents of the error-page, but since the header of the page contains </p>
  
  <pre><code>&lt;meta name="cid" content="1" /&gt;
  </code></pre>
  
  <p>i'm getting an error while rendering the error page:</p>
  
  <pre><code>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$000(ServletInitialHandler.java:80) [undertow-servlet-1.2.8.Final.jar:1.2.8.Final]
  at io.undertow.servlet.handlers.ServletInitialHandler$1.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$1.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]
  </code></pre>
  
  <p>any idea how to disable this conversation? I tried with adding "nocid=true"</p>
  
  <pre><code>&lt;error-page&gt;
      &lt;exception-type&gt;javax.enterprise.context.NonexistentConversationException&lt;/exception-type&gt;
      &lt;location&gt;/error-pages/session-expired.xhtml?nocid=true&lt;/location&gt;
  &lt;/error-page&gt;
  </code></pre>
  
  <p>but since it's only a partial rerender, I suppose it's not taken into account.</p>