This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Spring and the fly likes Context initialization failed in spring Initlization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Context initialization failed in spring Initlization" Watch "Context initialization failed in spring Initlization" New topic
Author

Context initialization failed in spring Initlization

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi ,

I am getting error in using spring.

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_authenticationManager': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No authentication providers were found in the application context
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
at

Regards,
Prabhat
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17258
    
    6

OK, it looks like you are using Spring Security. In that you are required for defining an AuthenticationProvider/UserDetailsService to load your user data. Since every app uses something different, it will be specific to your application. But you have to define a bean for it.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Context initialization failed in spring Initlization