Announcement Announcement Module
No announcement yet.
No context set in the ContextHolder before evaluating it Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • No context set in the ContextHolder before evaluating it

    Hi Spring/Acegi-ies,

    I've just entered this forum, after I tried hard to understand my silly problem myself. Hope I don't steal too much of your time.
    I tried this simple introduction example to integrate Acegi (think it was Matt Raible who wrote it?) with Tomcat 5.0.28. I failed to make it work, of course.

    I dug down to find the following:
    AbstractSecurityInterceptor throws exception because ContextHolder.getContext() is null at line 280. I understand this. But I fail to understand where this should have been set before. It was the FilterSecurityInterceptor that intercepted the call, and no call to setContext was logged prior to it. My question that isn't quite answered by the refdoc: Where exactly is the first instance of the context to be created in the simple web filter scenario?

    I'd be happy about general remarks, too. I really try to understand this.

    Yeah, and you're right: Spring rocks!

  • #2
    Line 280 of AbstractSecurityInterceptor in CVS doesn't throw an exception. Perhaps you could try the latest CVS, just so we can talk the same line numbers? There are CVS and building instructions at

    In terms of general comments, your AuthenticationProcessingFilter is where the SecureContext is first created. This is created in response to the AuthenticationProcessingFilterEntryPoint being called, which is called by SecurityEnforcementFilter. So it would seem your configuration isn't quite right. Could you post a copy of your configuration?