ICEpush
  1. ICEpush
  2. PUSH-116

Verify Servlet 3.0 support on Tomcat 7

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta
    • Fix Version/s: 2.0.1
    • Component/s: Push Library
    • Labels:
      None
    • Environment:
      ICEfaces, Tomcat 7

      Description


      When ICEfaces is configured to use Servlet 3.0, the following Exception occurs with ICEpush:


      Caused by: java.lang.IllegalStateException: Calling [asyncComplete()] is not valid for a request with Async state [DISPATCHED]
      at org.apache.coyote.AsyncStateMachine.asyncComplete(AsyncStateMachine.java:186)
      at org.apache.coyote.http11.Http11Processor.actionInternal(Http11Processor.java:506)
      at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:809)
      at org.apache.coyote.Request.action(Request.java:344)
      at org.apache.catalina.core.AsyncContextImpl.complete(AsyncContextImpl.java:83)
      at org.icepush.servlet.AsyncAdaptingServlet$AsyncRequestResponse.respondWith(AsyncAdaptingServlet.java:66)
      at org.icepush.BlockingConnectionServer.respondIfPendingRequest(BlockingConnectionServer.java:196)

        Activity

        Hide
        Ted Goddard added a comment -

        Since the contentType can likely be set twice, the recommended fix is to call setContentType as above, then rely on re-setting it in other cases. This will at least have the effect of supporting Servlet 3.0 except under error conditions.

        Show
        Ted Goddard added a comment - Since the contentType can likely be set twice, the recommended fix is to call setContentType as above, then rely on re-setting it in other cases. This will at least have the effect of supporting Servlet 3.0 except under error conditions.
        Hide
        Ted Goddard added a comment -

        The current Tomcat implementation may be expecting that the headers are set prior to the return of the original service() method.

        Show
        Ted Goddard added a comment - The current Tomcat implementation may be expecting that the headers are set prior to the return of the original service() method.
        Hide
        Mircea Toma added a comment -

        Set default text/xml content type to workaround Tomcat's limitation (headers are sent only when added on the request thread).

        Show
        Mircea Toma added a comment - Set default text/xml content type to workaround Tomcat's limitation (headers are sent only when added on the request thread).
        Hide
        Mircea Toma added a comment -

        Issue recorded in Tomcat's bug tracking system: https://issues.apache.org/bugzilla/show_bug.cgi?id=50753

        Show
        Mircea Toma added a comment - Issue recorded in Tomcat's bug tracking system: https://issues.apache.org/bugzilla/show_bug.cgi?id=50753
        Hide
        Mircea Toma added a comment -

        Looks like the issue was already fix in Tomcat 7.0.8 version.

        Show
        Mircea Toma added a comment - Looks like the issue was already fix in Tomcat 7.0.8 version.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: