Announcement Announcement Module
Collapse
No announcement yet.
RuntimeException in AuthenticationProvider skipping Spring MVC ExceptionResolver Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RuntimeException in AuthenticationProvider skipping Spring MVC ExceptionResolver

    Hi folks,

    I'm running into an issue where an uncaught exception in the Spring Security filter chain is not being caught by my Spring ExceptionResolver. Uncaught exceptions in my controllers, etc. do get caught by the ExceptionResolver. Is there something additional that needs to be done for Spring Security exceptions?

    For testing I'm throwing a RuntimeException in my AuthenticationProvider. If I remove my <error-page> last-ditch catch-all from my web.xml I get a 500 page from my servlet container. However, I would expect this to get caught and logged by the SimpleMappingExceptionResolver I have configured, as uncaught exceptions in other places in the code are handled properly there.

    Thanks,
    Nick Spacek

  • #2
    Filter's occur before the SimpleMappingExceptionResolver is in scope to catch any Exceptions from the Filters. You either need to add the error-mapping in your web.xml or add a custom Filter prior to springSecurityFilterChain filter-mapping.

    Comment

    Working...
    X