1 Reply Latest reply on Feb 3, 2017 3:05 AM by Markus Hofmann

    IllegalStateException with FacesServlet using Wildfly 10.1.0.Final

    Markus Hofmann Newbie

      Hi @all,

       

      I try to get run a code example which was orignally written for Wildfly 8. I'm using Wildfly 10.1.0.Final and come today to the conclusion that I can't get it to run.


      The example comes from the book "Java EE 7 Development with Wildfly" and could be downloaded here:

      packt-java-ee-7-code-samples/1980EN_04_Code/ticket-agency-cdi at master · packt-wildfly/packt-java-ee-7-code-samples · G…

       

      Every time when I invoke http://localhost:8080/ticket-agency-cdi/ the server throws an exception.

       

      2017-02-01 09:41:31,644 INFO  [com.packtpub.wflydevelopment.chapter4.controller.TheatreBooker$Proxy$_$$_WeldSubclass] (default task-1) Executing method public int com.packtpub.wflydevelopment.chapter4.controller.TheatreBooker.getMoney()

      2017-02-01 09:41:31,690 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /ticket-agency-cdi/: 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:424)

              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.PredicateHandler.handleRequest(PredicateHandler.java:43)

              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

              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:292)

              at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)

              at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)

              at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

              at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

              at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

              at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)

              at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)

              at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)

              at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)

              at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)

              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)

              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)

              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)

              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)

       

      Because I don't understand the background of FacesServlet and the web.xml. Can somebody help me to get it run under Wildfly 10.1?

       

      Thanks,

      Markus