Spring ShallowEtagHeaderFilter failes on EAP 7

Solution Verified - Updated -

Issue

  • Spring ShallowEtagHeaderFilter is failing when used with async controllers and undertow. The reason is that it assumes that the servlet container uses ServletResponse form AsyncContext for subsequent async processing. The following exception is seen:
ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /springApp: java.lang.IllegalArgumentException: ContentCachingResponseWrapper not found
    at org.springframework.util.Assert.notNull(Assert.java:198)
    at org.springframework.web.filter.ShallowEtagHeaderFilter.updateResponse(ShallowEtagHeaderFilter.java:119)
    at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:112)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

Environment

  • JBoss Enterprise Application Platform (EAP) 7.3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content