0 Replies Latest reply on Aug 15, 2012 6:58 PM by kelly goedert

    clustered jboss and jsf2 viewExpiredException

    kelly goedert Apprentice

      n votefavorite

       

      Hi

      I have an application using jsf 2 in a jboss 6.1. Running it locally it works perfectly. But if I put the same application in a clustered environment, I get a ViewExpiredException. It seems to happen when the node that answers the request is not the same one that answered the previous. But it is just a guess.

      I tried putting the tag in my web.xml and tried putting this configs in my jboss-web.xml

      <replication-config>
         
      <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger>
         
      <replication-granularity>SESSION</replication-granularity>
      </replication-config>

      The exception is:

      Servlet threw exception: javax.enterprise.event.ObserverException
      at sun
      .reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.6.0_24]
      at sun
      .reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [:1.6.0_24]
      at sun
      .reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [:1.6.0_24]
      at java
      .lang.reflect.Constructor.newInstance(Constructor.java:513) [:1.6.0_24]
      at java
      .lang.Class.newInstance0(Class.java:355) [:1.6.0_24]
      at java
      .lang.Class.newInstance(Class.java:308) [:1.6.0_24]
      at org
      .jboss.weld.util.reflection.SecureReflections$16.work(SecureReflections.java:395) [:6.1.0.Final]
      at org
      .jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [:6.1.0.Final]
      at org
      .jboss.weld.util.reflection.SecureReflectionAccess.runAsInstantiation(SecureReflectionAccess.java:216) [:6.1.0.Final]
      at org
      .jboss.weld.util.reflection.SecureReflections.newInstance(SecureReflections.java:390) [:6.1.0.Final]
      at org
      .jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40) [:6.1.0.Final]
      at org
      .jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:92) [:6.1.0.Final]
      at org
      .jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:214) [:6.1.0.Final]
      at org
      .jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:282) [:6.1.0.Final]
      at org
      .jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:265) [:6.1.0.Final]
      at org
      .jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:234) [:6.1.0.Final]
      at org
      .jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:635) [:6.1.0.Final]
      at org
      .jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:622) [:6.1.0.Final]
      at org
      .jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:616) [:6.1.0.Final]
      at org
      .jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:74) [:3.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org
      .jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [:3.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at myapp
      .utils.EncodingHttpParamsFilter.doFilter(EncodingHttpParamsFilter.java:35) [:]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org
      .apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.1.0.Final]
      at org
      .apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [:6.1.0.Final]
      at org
      .jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.1.0.Final]
      at org
      .jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
      at org
      .jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
      at org
      .jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final]
      at org
      .jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final]
      at org
      .apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final]
      at org
      .apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final]
      at org
      .jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final]
      at org
      .apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final]
      at org
      .jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final]
      at org
      .apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final]
      at org
      .apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final]
      at org
      .apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final]
      at org
      .apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final]
      at java
      .lang.Thread.run(Thread.java:662) [:1.6.0_24]
      Caused by: javax.servlet.ServletException: viewId:/app/create.app - A exibi��o de /app/create.app no pde ser restaurada.
      at javax
      .faces.webapp.FacesServlet.service(FacesServlet.java:606) [:2.1.7-SNAPSHOT]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org
      .primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) [:]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org
      .jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at com
      .ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:126) [:]
      at org
      .apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org
      .apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org
      .jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [:3.1.0.Final]
      ... 25 more
      Caused by: javax.faces.application.ViewExpiredException: viewId:/app/create.app - A exibi��o de /app/create.app no pde ser restaurada.
      at com
      .sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:205) [:2.1.7-SNAPSHOT]
      at com
      .sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.7-SNAPSHOT]
      at com
      .sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [:2.1.7-SNAPSHOT]
      at com
      .sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [:2.1.7-SNAPSHOT]
      at javax
      .faces.webapp.FacesServlet.service(FacesServlet.java:593) [:2.1.7-SNAPSHOT]
      ... 37 more

      Should I configure anything else on jboss? Besides starting it with the all context and the node configurations?

      Or set some other config in the application?

      Thanks

      Kelly