alessandro
alessandro

Reputation: 119

Custom Filter Interceptor and Grails spring-security 2.0rc2 plugin

i'm working on a grails (2.3.5) webapp with spring security core 2.0RC2 plugin. I try to create a custom filter following this custom-security-filter-for-grails-spring-security-3-plugin, similar to this stackoverflow post 3392552. This peace of code are working better if the version of grails spring-security plugin is 1.2.7.3, than if the version is 2.0rc2 the webapp doesn't start and the log contains this error:

java.lang.ClassCastException: grails.plugin.springsecurity.web.filter.DebugFilter cannot be cast to org.springframework.security.web.FilterChainProxy
at grails.plugin.springsecurity.SpringSecurityUtils.clientRegisterFilter(SpringSecurityUtils.java:454)
at BootStrap$_closure1.doCall(BootStrap.groovy:37)
at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308)
at grails.util.Environment.executeForEnvironment(Environment.java:301)
at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

I try to create a simple servlet filter but the error was the same.

thank's for replies

Upvotes: 1

Views: 1181

Answers (1)

Burt Beckwith
Burt Beckwith

Reputation: 75671

This could be a bug. Please create a small test app that demonstrates the problem and run "grails bug-report". Attach that generated zip to an issue at http://jira.grails.org/browse/GPSPRINGSECURITYCORE and I'll take a look.

Upvotes: 1

Related Questions