1 Reply Latest reply on Nov 9, 2014 5:20 PM by anouqrat

    Asynchronous HTTP Request Processing

    cyberdaddex

      Hello I have to implement Asynchronous HTTP Request Processing, from this example with resteasy "http://docs.jboss.org/resteasy/docs/1.1.GA/userguide/html/Asynchronous_HTTP_Request_Processing.html".

       

      The client is a web application using a recursive function based on XMLHttpRequest with a GET request. The purpose is to make a web push system and receive data only when event occurs. My solution it seems to work except sometimes an error is triggered in jboss log, fortunately the error is not fatal and my system does not crash but the message is very bothering, below the error, any idea or tips how to integrate a web client with resteasy  Asynchronous HTTP Request Processing or any particular config ?

       

      thanks Davide

       

       

      11:56:30,250 ERROR [org.apache.catalina.connector.CoyoteAdapter] An exception or error occurred in the container during the request processing: java.lang.IllegalStateException: Invalid async context for servlet default

       

          at org.apache.catalina.core.StandardWrapperValve.async(StandardWrapperValve.java:643) [:6.0.0.Final]

       

          at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:402) [:6.0.0.Final]

       

          at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:260) [:6.0.0.Final]

       

          at org.jboss.web.tomcat.security.SecurityAssociationValve.event(SecurityAssociationValve.java:328) [:6.0.0.Final]

       

          at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:281) [:1.1.0.Final]

       

          at org.jboss.web.tomcat.security.JaccContextValve.event(JaccContextValve.java:116) [:6.0.0.Final]

       

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.event(SecurityContextEstablishmentValve.java:161) [:6.0.0.Final]

       

          at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:178) [:6.0.0.Final]

       

          at org.apache.catalina.valves.ValveBase.event(ValveBase.java:200) [:6.0.0.Final]

       

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.event(CachedConnectionValve.java:186) [:6.0.0.Final]

       

          at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:128) [:6.0.0.Final]

       

          at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.event(ActiveRequestResponseCacheValve.java:70) [:6.0.0.Final]

       

          at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:265) [:6.0.0.Final]

       

          at org.apache.coyote.http11.Http11Processor.event(Http11Processor.java:757) [:6.0.0.Final]

       

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.event(Http11Protocol.java:602) [:6.0.0.Final]

       

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:938) [:6.0.0.Final]

       

          at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]

        • 1. Re: Asynchronous HTTP Request Processing
          anouqrat

          Hi Davide,

          I'm facing the same problem using Servlet 3.0 API to do asynchronous HTTP Request processing.

          Could you find out when this exception occurs ?

          If yes, it will be very nice if you let me know about the solution to avoid this exception.

           

          Thanks in advance.