Skip to content
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

[spring-web-reactive] NPE in RequestMappingHandlerAdapter at Startup [SPR-14869] #19435

Closed
spring-projects-issues opened this issue Nov 2, 2016 · 1 comment
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 2, 2016

Abhijit Sarkar opened SPR-14869 and commented

RequestMappingHandlerAdapter.getDefaultInitBinderArgumentResolvers has the following which blows up with a NPE at startup.

// Custom resolvers
if (getCustomArgumentResolvers() != null) {
    resolvers.addAll(getCustomInitBinderArgumentResolvers());
}
Caused by: java.lang.NullPointerException
	at java.util.ArrayList.addAll(ArrayList.java:577)
	at org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter.getDefaultInitBinderArgumentResolvers(RequestMappingHandlerAdapter.java:277)
	at org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerAdapter.afterPropertiesSet(RequestMappingHandlerAdapter.java:220)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1642)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
	... 58 more

Obviously, getCustomInitBinderArgumentResolvers returns null. I'm running Spring Boot 2.0.0.BUILD-SNAPSHOT with spring-boot-starter-web-reactive 0.1.0.BUILD-SNAPSHOT. The project wouldn't start due to this issue, and is not particularly small, so I am not providing a link to it to begin with. I'm hoping that this is an obvious issue that doesn't need a reproducible project as proof.


Affects: 5.0 M2

Referenced from: commits 388e173

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 2, 2016

Rossen Stoyanchev commented

Yes and thanks for catching that. The fix should be available once the CI build is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants