Skip to content
Advertisement

Unable to Run my Spring Security MVC WebApp SpringChainFilter throwing exception, rawPassword cannot be null

So I was trying to make a simple spring security hardcoded security just to check how my app is working before connecting it to the DB but before that it start showing me error 500.

Here is my Configuration file

JavaScript

Here is my webSecurity Configuration class with In memory authentication with some sample data.

JavaScript

Here is my Servlet Initializer Class where I am using java based configuration instead of web.xml

JavaScript

Here is the code for Spring security container initlizer which basically extends a class to do it.

JavaScript

this is my controller class

JavaScript

Here is my Pom file where I have added my depedencies

JavaScript

And I have a simple JSP page which I am sure is not the reason for the error.

Here is the output which I am getting

JavaScript

I am not adding log file error as my question already looking to verbose. Kindly help.

Advertisement

Answer

The problem is that in your authenticationManagerBuilder, you are creating 6 different users, and with only one parameter, either username or password or roles. Try with the following config.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement