This week's book giveaway is in the Agile and Other Processes forum. We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line! See this thread for details.
You might find it easier to configure LDAP authentication (and Spr Sec itself) using the security namespace support instead of creating beans yourself. It's quite easy, especially for newcomers, to miss a critical bean or bean property when manually wiring the Spr Sec beans.
1> Could you please give us (or review) the previous few lines above this one you posted?
2> Alternatively, you can simply run this in a debugger and set a breakpoint at the line indicated OR on the NoSuchFieldException exception (most IDEs can do this). This approach has been successful for me in the past when trying to diagnose difficult problems.
1> Does that directory exist?
2> With Eclipse WTP, it's often easiest to just delete the configured server and create a new one if you run into problems. Then redeploy your web application(s). Depending on the Eclipse WTP version you are using, some of the other available options for cleaning up may or may not work.
This looks 90% probable not to be related to Spring Security. Do you have any other configuration files OR do you have a bean using constructor injection with the @Autowired annotation? If you enable a higher level of Spring logging, you should get information on what specific bean it is trying to wire.
You probably want to look into hooking into the authentication events published by the framework, which uses the standard Spring ApplicationListener functionality. The Spr Sec framework ships with "LoggerListener", which should provide you with an example of how to use these. Refer to the Javadoc for the relevant classes here.
If it is "SPRING_SECURITY_SAVED_REQUEST" in particular that you are trying to get, I think this is saved as a session attribute and not request attribute (because it needs to persist through several requests involved in login and authentication). Can you provide us the name of the attribute you are trying to retrieve? Is it set by your code, or Spring Security?
Sorry about that confusion, it wasn't clear in your original question that was what you meant. Can you post the source of the setUserLogged method, and clearly indicate what is not working as you expect?
Yeah, frameworks like Spring are great, but the fundamentals are more important. Knowing why a certain decision is made is more important than finding a code snippet that works, not really knowing whether it makes sense.
This is the 1000% truth. Understanding "why" and not "how" is what makes you a great developer.