2 years ago

#42142

test-img

Mike Rother

NullPointerException When Upgrading From Spring Boot 2.5.6 to 2.6.2 - Incompatibility With Wildfly

We are upgrading a Spring Boot App deployed on Wildfly from Spring Boot 2.5.6 to 2.6.2. The majority of the app is working fine. However, we see the following stack trace on several URL's. One example is the CXF page listing web services which worked fine on Spring Boot 2.5.6.

2022-01-12 08:02:08,130 ERROR [org.springframework.boot.web.servlet.support.ErrorPageFilter] (default task-2) Forwarding to error page from request [/webservices] due to exception [HandlerMapping exception not suppressed]: java.lang.IllegalStateException: HandlerMapping exception not suppressed
    at org.springframework.web.servlet.handler.HandlerMappingIntrospector.doWithMatchingMappingIgnoringException(HandlerMappingIntrospector.java:220)
    at org.springframework.web.servlet.handler.HandlerMappingIntrospector.getCorsConfiguration(HandlerMappingIntrospector.java:161)
    at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:86)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
....
Caused by: java.lang.NullPointerException
at io.undertow.servlet@2.0.27.Final//io.undertow.servlet.spec.HttpServletRequestImpl.getHttpServletMapping(HttpServletRequestImpl.java:250)

I set the CXF libraries to be the same at the previous version. I was wondering if people were seeing similar issues and what is the source of the difference.

UPDATE #1


I researched further and found what appears to be come incompatibility between Spring web classes and the implementation within Undertow packaged with Wildfly. I tried several Wildfly version with the following results:

  • Wildfly 18.0.1 : NullPointerException shown above
  • Wildfly 23.0.2 : NullPointerException shown above
  • Wildfly 24.0.1 : no issues
  • Wildfly 26.0.0 : no issues
  • Redhat EAP 7.4 : NullPointerException shown above

I further researched by exchanging the Undertow versions under the modules folder.

  • Wildfly 18.0.1 / Undertow 2.0.27.Final : NullPointerException
  • Wildfly 23.0.2 / Undertow 2.2.5.Final : NullPointerException
  • Wildfly 24.0.1 / Undertow 2.2.8.Final : no issues
  • Wildfly 26.0.0 / Undertow 2.2.14.Final : no issues
  • Redhat EAP 7.4 / Undertow 2.2.5.Final-redhat-00001 : NullPointerException

If I move undertow files under /modules folder for Wildfly 24.0.1 to Wildfly 23.0.2 or Redhat EAP 7.4, the system deploys and runs with no issues when I access the url.So it appears the issue was addressed in Undertow between 2.2.5 and 2.2.8.

So it appears that our clients are limited on upgrading their systems. Especially our clients who utilize Redhat EAP version, they will have to wait for an update.

UPDATE #2


After looking at the release notes for Undertow, the problem appears to be https://issues.redhat.com/browse/UNDERTOW-1866

spring-boot

spring-mvc

wildfly

redhat

0 Answers

Your Answer

Accepted video resources