-
Notifications
You must be signed in to change notification settings - Fork 41.2k
NullPointerException in ErrorPageFilter when a MissingServletRequestParameterException is thrown and there's no DefaultHandlerExceptionResolver #22169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report. I can see how the NPE could occur in theory but in practice I have been unable to reproduce it. When a To allow us to be sure that we fully understand the problem that you're seeing, can you please create a minimal sample that reproduces the problem and share it with us? You can do so by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue. |
Generating a sample is not so easy as we are using a large old codebase from the pre-Spring-Boot era. But your hint to |
How are you configuring Spring MVC? If you're not using the auto-configuration, |
We are using a CMS system which provides the Spring configuration within its dependencies. It is xml-based and I do not think that there is a |
Thanks, @rmueller83. That explains it I think. |
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 aMissingServletRequestParameterException
without a root cause. TheErrorPageFilter
in Spring Boot expects allNestedServletException
s (whichMissingServletRequestParameterException
is derived from) to have a root cause, leading to theNullPointerException
:The text was updated successfully, but these errors were encountered: