java.lang.IllegalArgumentException: ContentCachingResponseWrapper not found

tip

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Async calling rest service with rest-assured
    via Stack Overflow by riso
    ,
  • JMS message listener error
    via Stack Overflow by user3649231
    ,
  • Spring Tomcat mvc api error
    via Stack Overflow by Froodle Stirling
    ,
  • @WebMvcTest mapperscan conflict
    via Stack Overflow by wei Xiong
    ,
    • java.lang.IllegalArgumentException: ContentCachingResponseWrapper not found at org.springframework.util.Assert.notNull(Assert.java:115) at org.springframework.web.filter.ShallowEtagHeaderFilter.updateResponse(ShallowEtagHeaderFilter.java:97) at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:90) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) at org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134) at org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:155) at io.restassured.module.mockmvc.internal.MockMvcRequestSenderImpl.getMvcResult(MockMvcRequestSenderImpl.java:214)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    batwalrus76
    batwalrus7618 times, last one,
    Casper
    Casper16 times, last one,
    tvrmsmith
    tvrmsmith1 times, last one,
    189 more bugmates