Announcement Announcement Module
No announcement yet.
getAuthentication returns null sometimes Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • getAuthentication returns null sometimes


    I have strange problem with Sping BlazeDS integration Version 1.0.0.M2 and Spring security. I am using Tomcat 5.5.27.

    Most of the time everything works fine but sometimes when calling SecurityContextHolder.getContext().getAuthenticati on().getPrincipal() fails because getAuthentication returns null. After few seconds exactly the same code in same method may work fine(same button clicked on Flex client, same parameters). There's not any pattern to reproduce this every time Maybe I have some problem in session handling? I followed Spring BlazeDS Integration Reference Guide for configuring security.

    Any ideas?

  • #2


    I found the reason. I didn't have springSecurityFilterChain configured in my web.xml. Seems to be working now as expected.


    • #3
      Having the same problem

      Hi there,

      I may be having the same problem you were having, but I have my springSecurityFilterChain configured properly, as this:

      org.springframework.web.filter.DelegatingFilterPro xy


      Were you also getting a AuthenticationCredentialsNotFoundException? I'm struggling with this, I can't get the SecurityContext consistently after getting the user authenticated. Sometimes it works, but most times the Authentication is null and I end up getting the exception above. Could really use some help with this


      • #4
        This could potentially be related to a couple of the bugs we fixed in RC1. Try upgrading and see if you have the same issue.