3 Replies Latest reply on Aug 3, 2018 11:41 AM by jpari1982

    JSF 2.2 + RichFaces 5.0.0-SNAPSHOT - IllegalArgumentException

    rodrigo2906

      I have an application running on Wildfly 8.1 (JSF 2.1) which uses RichFaces 5.0.0-SNAPSHOT and I'm trying to migrate to EAP 7 (JSF 2.2).

      All my requests are throwing an exception.

      Any ideas on how to overcome this problem? Btw I've tried to downgrade to RF4.5.17 but functionality was completely broken (as well as layout).

       

      15:28:21,512 ERROR [io.undertow.request] (default task-21) UT005023: Exception handling request to /webpricer/index.jsf: java.lang.IllegalStateException
      at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:712)
      at com.sun.faces.context.FacesContextImpl.getAttributes(FacesContextImpl.java:239)
      at org.richfaces.context.ExtendedPartialViewContext.setInstance(ExtendedPartialViewContext.java:55)
      at org.richfaces.context.ExtendedPartialViewContext.release(ExtendedPartialViewContext.java:64)
      at org.richfaces.context.ExtendedPartialViewContextImpl.release(ExtendedPartialViewContextImpl.java:473)
      at com.sun.faces.context.FacesContextImpl.release(FacesContextImpl.java:598)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:677)
      at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)
      at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56)
      at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
      at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
      at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)
      at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:792)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      
      
        • 1. Re: JSF 2.2 + RichFaces 5.0.0-SNAPSHOT - IllegalArgumentException
          michpetrov

          You shouldn't use RichFaces 5 (or any other snapshot), it's not meant for production. I can't tell you what the problem is based on the stacktrace, are you working with FacesContext in your beans?

          1 of 1 people found this helpful
          • 2. Re: JSF 2.2 + RichFaces 5.0.0-SNAPSHOT - IllegalArgumentException
            rodrigo2906

            Michal,

            Yes we are using FacesContext in our beans.

            For now I found a workaround updating EAP module jars but I'll look for a better solution and/or replace RF for something else.

            1 of 1 people found this helpful
            • 3. Re: JSF 2.2 + RichFaces 5.0.0-SNAPSHOT - IllegalArgumentException
              jpari1982

              We are moving a application with RichFaces 4.3.7 to EAP 7.0.9 and facing same issue.

              Application is very sporadic, working sometimes and somtimes not...what was the solution you have tried to make it work

               

              2018-08-03 11:26:26,247 ERROR [io.undertow.request] (default task-34) UT005023: Exception handling request to /pcc/policysearch: java.lang.IllegalStateException

              at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:712)

              at com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:141)

              at com.thehartford.pl.agency.pcc.controller.PlassController.<init>(PlassController.java:45)

              at com.thehartford.pl.agency.service.servlet.PCCLoginServlet.doPost(PCCLoginServlet.java:54)