You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Spring Boot 2.1.12 with Spring Web 5.1.3.
A controller has a method annotated with @RequestMapping and a mandatory @RequestParam parameter. When the controller is called without the mandatory parameter, Spring Web throws a MissingServletRequestParameterException without a root cause. The ErrorPageFilterin Spring Boot expects all NestedServletExceptions (which MissingServletRequestParameterException is derived from) to have a root cause, leading to the NullPointerException:
java.lang.NullPointerException
at org.springframework.boot.web.servlet.support.ErrorPageFilter.handleException(ErrorPageFilter.java:165)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:142)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:66)
at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:103)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:121)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
...