Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11064

Push: Invalid async context for servlet AutoRegisteredPushServlet

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Partially Completed
    • Affects Version/s: 4.1.0.Milestone1
    • Fix Version/s: None
    • Component/s: component-a4j-core
    • Labels:
      None
    • Environment:

      Firefox 4.0.1 / Chromium 12
      AS 6.0.0.Final / 6.1.0-SNAPSHOT / AS 7.0.0.CR1
      Atmosphere 0.7.1/0.7.2

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use blocking I/O approach instead of native API (async servlet 3.0 support)

      <context-param>
              <param-name>org.atmosphere.useBlocking</param-name>
              <param-value>true</param-value>
      </context-param>
      

      See for details: http://atmosphere.java.net/atmosphere_whitepaper.pdf

      Show
      Use blocking I/O approach instead of native API (async servlet 3.0 support) < context -param> < param -name>org.atmosphere.useBlocking</ param -name> < param -value>true</ param -value> </ context -param> See for details: http://atmosphere.java.net/atmosphere_whitepaper.pdf

      Description

      Steps to reproduce:
      1. configure hornetq-configuration.xml and hornetq-jms.xml
      2. start JBoss
      3. deploy application push-jms.war
      4. open http://localhost:8080/push-jms/home.jsf
      5. the issue will occur after several (tens) of push events (which are triggered each second)

      Sample application: https://github.com/lfryc/push-jms/
      Reproduced on: https://github.com/lfryc/push-jms/tree/6dd6b623410e30ee4406e13fb6e22866e652e637

      deploy/hornetq/hornetq-jms.xml:

         <topic name="chat">
            <entry name="/topic/chat"/>
         </topic>
      

      deploy/hornetq/hornetq-configuration.xml

               <permission type="deleteDurableQueue" roles="guest"/>
               <permission type="deleteDurableQueue" roles="guest"/>
      

      16:21:52,065 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 AutoRegisteredPushServlet
      	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:636) [:1.6.0_20]
       
      16:21:52,076 ERROR [STDERR] java.lang.NullPointerException
      16:21:52,076 ERROR [STDERR] 	at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:168)
      16:21:52,076 ERROR [STDERR] 	at org.atmosphere.container.Servlet30Support.action(Servlet30Support.java:63)
      16:21:52,076 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:175)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.Meteor.resume(Meteor.java:199)
      16:21:52,077 ERROR [STDERR] 	at org.richfaces.application.push.impl.RequestImpl.resume(RequestImpl.java:61)
      16:21:52,077 ERROR [STDERR] 	at org.richfaces.application.push.impl.SessionImpl.releaseRequest(SessionImpl.java:112)
      16:21:52,077 ERROR [STDERR] 	at org.richfaces.application.push.impl.SessionImpl.connect(SessionImpl.java:85)
      16:21:52,077 ERROR [STDERR] 	at org.richfaces.application.push.impl.RequestImpl.onSuspend(RequestImpl.java:91)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereResourceImpl.onSuspend(AtmosphereResourceImpl.java:483)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:455)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:443)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereResourceImpl.suspend(AtmosphereResourceImpl.java:247)
      16:21:52,077 ERROR [STDERR] 	at org.atmosphere.cpr.Meteor.suspend(Meteor.java:189)
      16:21:52,077 ERROR [STDERR] 	at org.richfaces.application.push.impl.RequestImpl.suspend(RequestImpl.java:57)
      16:21:52,078 ERROR [STDERR] 	at org.richfaces.webapp.PushHandlerFilter.doFilter(PushHandlerFilter.java:102)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.util.AtmosphereFilterChain.doFilter(AtmosphereFilterChain.java:139)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.util.AtmosphereFilterChain.invokeFilterChain(AtmosphereFilterChain.java:116)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.service(ReflectorServletProcessor.java:294)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.handler.ReflectorServletProcessor.onRequest(ReflectorServletProcessor.java:152)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.cpr.AsynchronousProcessor.action(AsynchronousProcessor.java:191)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.cpr.AsynchronousProcessor.suspended(AsynchronousProcessor.java:142)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.container.Servlet30Support.service(Servlet30Support.java:87)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereServlet.doCometSupport(AtmosphereServlet.java:1156)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereServlet.doPost(AtmosphereServlet.java:1138)
      16:21:52,078 ERROR [STDERR] 	at org.atmosphere.cpr.AtmosphereServlet.doGet(AtmosphereServlet.java:1124)
      16:21:52,079 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
      16:21:52,079 ERROR [STDERR] 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      16:21:52,079 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
      16:21:52,079 ERROR [STDERR] 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
      16:21:52,079 ERROR [STDERR] 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      16:21:52,079 ERROR [STDERR] 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      16:21:52,079 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
      16:21:52,079 ERROR [STDERR] 	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
      16:21:52,079 ERROR [STDERR] 	at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
      16:21:52,079 ERROR [STDERR] 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
      16:21:52,079 ERROR [STDERR] 	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
      16:21:52,080 ERROR [STDERR] 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      16:21:52,080 ERROR [STDERR] 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      16:21:52,080 ERROR [STDERR] 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      16:21:52,080 ERROR [STDERR] 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      16:21:52,081 ERROR [STDERR] 	at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
      16:21:52,081 ERROR [STDERR] 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
      16:21:52,081 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      16:21:52,081 ERROR [STDERR] 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
      16:21:52,084 ERROR [STDERR] 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:946)
      16:21:52,084 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:636)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lfryc Lukáš Fryč (Inactive)
                  Reporter:
                  lfryc Lukáš Fryč (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: