This is happened to be spring configuration related issue.
Make sure spring-security.xml is correct in all ways.
I found reason behind is my default-target-url was incorrect.
It was without / i.e. default-target-url="test" it should be default-target-url="/test".
Help more people:- Share this link, or comment if you have any suggestion.