!asyncSupported exception when switch from Jetty 7 to Jetty 9

we recently upgraded our jetty version. when we did this both of our legacy gui war files, which no one has modified in some time, stopped working correctly. I believe I hunted the root cause to the proxy (used to proxy to a restful interface on another port), any call to the proxy throws the exception:

 IllegalStateException: !asyncSupported

I'm not sure why this would occure with 1.9 but not with the old jetty. I can't build the war file currently, it was a mess that only one developer could ever build, but I trid unzipping it with jetty -x and ading to the servlet section of the web.xml file this:

<async-supported>true</async-supported>

and then rezipping it with jar c command. that didn't seem to help, though now i get exceptions in my jetty log fhile while before they would only show in the browser.

can anyone tell me what to do to activate async support and/or why the switch in jetty would cause this?

Enable async-supported for filters in spring boot, After upgrading to the latest Jetty 8, I'm getting a failure (stack trace below). / asyncsupported-exception-when-switch-from-jetty-1-7-to-1-9. Copy and rename commons-daemon binaries into the JETTY_HOME directory structure REM Note that the GUI manager is copied to JETTY_HOME, REM and the service exe is copied to JETTY_HOME\bin REM Note that both binaries get the same target name, REM but are placed in different directories REM This is just makes it easier to launch the GUI manager

My exception is the same to you. then I put "<async-supported>true</async-supported>" append to every servlet and filter. it work well. For excample

<filter>
    <filter-name>continuation</filter-name>
    <filter-class>org.eclipse.jetty.continuation.ContinuationFilter</filter-class>
    <async-supported>true</async-supported>
</filter>

<servlet>
    <servlet-name>cometd</servlet-name>
    <servlet-class>org.cometd.annotation.AnnotationCometdServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <async-supported>true</async-supported>
</servlet>

the other hand. if you used jetty9.x. you'd better update your comet jar to version 3.0.x or later. I hope it will help you.

Enable async with Jetty, If I execute the following with jetty-9.2.0.v20140526 it works just fine: you might have (eg jetty or context xml files?). thanks Jan On 9 June 2014 IllegalStateException: ! setAsyncSupported(isAsyncSupported);” change to� cheers Jan On 13 July 2013 00:07, Marty Stich <mstich@xxxxxxxxxx> wrote: > I recently moved from 9.0.3 to 9.0.4 and am now running into a problem using the jetty Continuation support. > > When I call continuation.suspend() in my HttpServlet.doGet, I now get the following exception: > > java.lang.IllegalStateException: !asyncSupported > at org

I can't (yet) put this as a comment, but I'd like to add: If you are having this trouble and have added the async-supported tag as appropriate (or are using Jetty 8), make sure your filters also support async or are not used with the servlet in question.

Re: [jetty-dev] Setting "asyncSupported" in ServletHolder.java, management � NumberFormatException � ProcessBuilder � ReferenceQueue Jetty Continuations API added a change in the servlet API that allows a request to be 7. 8. 9. < servlet >. < servlet-name >ContinuationsExampleServlet</ servlet- name > async-supported >true</ async-supported >. </ servlet >. I recently moved from 9.0.3 to 9.0.4 and am now running into a problem using the jetty Continuation support. When I call continuation.suspend() in my HttpServlet.doGet, I now get the following exception: java.lang.IllegalStateException: !asyncSupported at org.eclipse.jetty.server.Request.startAsync(Request.java:2016) at org.eclipse.jetty.continuation.Servlet3Continuation.suspend

For Java based config you may use

@javax.servlet.annotation.WebServlet(name = "HelloWorld",urlPatterns = { "/MyServlet" },asyncSupported =true)

Jetty Continuations Example, Merge remote-tracking branch 'origin/jetty-7' into jetty-8 Conflicts: in @@ -101,9 +154,10 @@ jetty-osgi-boot-logback bundle + 376152 apply context resources getJspConfigDescriptor + + JETTY-1460 suppress PrintWriter exceptions + + are not scanned for annotations + + JETTY-1224 Change jetty-8 merge rules for� tar -zxvf jetty-distribution-9.4.17.v20190418.tar.gz. Move Jetty directory to /opt or to the directory of your wish. mv jetty-distribution-9.4.17.v20190418 /opt/jetty Configure Jett Web Server. Create a user called jetty to run jetty web server on system start-up. useradd -m jetty. Change ownership of Jetty directory. chown -R jetty:jetty /opt

!asyncSupported exception on websockets, Gordon Wood. 7 months ago WARNING: Failed to create AsyncSupport class: class org.atmosphere.container. java.lang.IllegalStateException: Unable to configure jsr356 at that stage. I think this may be related to change made already in Vaadin 7.7. Some jetty jars use 9.2.9 like jetty-io-9.2.9.v20150224. jar. These are summarised FAQs of issues written by Hiep LQ directed more to developers. With the present Plan for release(s) we have just switched to zk7 branch.; You may read further at the comment section of IDEMPIERE-2245

jetty/org.eclipse.jetty.project, To switch off the HTTP endpoints completely, but still create a IllegalArgumentException: An invalid character [32] was present in the Cookie value Spring Boot provides Tomcat and Jetty dependencies bundled together as separate you are using Java 7) you will need to change your classpath to reference Jetty 9.2. The documentation for Jetty 9.1 is still catching up, but its improving every day. + 415832 jetty-start / fix ClassNotFound exception when starting from empty

Error happen when I update vaadin 7.5 to 8.0.5, @WebServlet(urlPatterns={"/asyncservlet"}, asyncSupported=true) public class AsyncServlet extends HttpServlet { } The javax.servlet.AsyncContext class� The most recent versions of prior Jetty releases can be found here, with their associated documentation.. Note: The canonical repository for Jetty is Maven Central. All releases are always available there first and this download page may lag a bit update wise as post release resources are put into place.

Comments
  • so...is there a way for me to default jetty to this in the jetty configuration rather then the war filse; sicne I can't rebuild the war at this point?
  • sorry, there's no quick solution for this.
  • feel free to file a bug asking for this enhancement. Could be possible via a custom WebAppContext attribute on a deployable context xml
  • Nice addition! Thank you.