At OAuth2AccessTokenResponseHttpMessageConverter it is using json message converter without checking if it is null or not, and if the classpath not have jackson, or Gson it is going to return null, but the message you got is missleading it is not telling that the lib is missing it is throwing NPE

Suggest to check and if it is null to throw meaning full Exception telling to add lib in classpath.

https://github.com/spring-projects/spring-security/blob/857830f6958c229650e6a00d376af38c8bcddbad/oauth2/oauth2-core/src/main/java/org/springframework/security/oauth2/core/http/converter/OAuth2AccessTokenResponseHttpMessageConverter.java#L78

Comment From: jgrandja

@bassemCross

Suggest to check and if it is null to throw meaning full Exception telling to add lib in classpath.

This would be a good enhancement. Would you be interested in submitting a PR for this?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.