PaxWeb: Undertow and async filter/servlet

163 views
Skip to first unread message

Jérémie Brébec

unread,
Jun 28, 2017, 4:20:22 AM6/28/17
to OPS4J
Hi,

I have an application using Karaf 4.1.1, PaxWeb and the jetty provider.

For testing purpose, I am trying the new undertow provider of pax web 6 : Most of my application seems to work, exception for my notification servlet, using the Servlet3 "startAsync" API. Undertow fails with this exception :

Caused by: java.lang.IllegalStateException: UT010026: Async is not supported for this request, as not all filters or Servlets were marked as supporting async
at io.undertow.servlet.spec.HttpServletRequestImpl.startAsync(HttpServletRequestImpl.java:948) ~[?:?]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at xxxx.security.authentication.web.CookieBasedSecurityContextRepository$Servlet3RequestWrapper.startAsync(CookieBasedSecurityContextRepository.java:168) ~[81:xxx.security-core:1.11.0.SNAPSHOT]
at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:432) ~[104:javax.servlet-api:3.1.0]
at org.springframework.security.web.servletapi.HttpServlet3RequestFactory$Servlet3SecurityContextHolderAwareRequestWrapper.startAsync(HttpServlet3RequestFactory.java:167) ~[?:?]

This application is securised with a SpringSecurity Filter, which has been register as an osgi service, with the property "osgi.http.whiteboard.filter.asyncSupported" = "true", (and works fine with Jetty).

Is there a configuration to add to use an async servlet with undertow ?

Not sure about it, but after reading the code, it looks like the Undertow provider doesn't respect the FilterModel.isAsync(), and don't call the undertow FilterInfo.setAsyncSupported(..) [1]

Regards, Jérémie



Achim Nierbeck

unread,
Jun 28, 2017, 4:02:31 PM6/28/17
to op...@googlegroups.com
Hi, 

sounds like you found a bug. Care for opening a jira issue for that? 
In case you don't have a Jira account yet, let me know so I can enable that for you :) 

regards, Achim 


--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master 

Jérémie Brébec

unread,
Jun 29, 2017, 4:08:04 AM6/29/17
to OPS4J
Thank you, I have created this issue : https://ops4j1.jira.com/browse/PAXWEB-1109
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages