Failed to convert property value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter'
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
### Expected Behavior
The app should run and connect to Active Directory over LDAP
### Actual Behaviour
Error creating bean with name 'filterInvocationInterceptorDeregistrationBean': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter' for property 'filter'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor' to required type 'javax.servlet.Filter' for property 'filter': no matching editors or conversion strategy found
### Steps To Reproduce
Create a new grails project with embedded tomcat
Add grails spring security plugins to build.gradle
Declare authManager bean in resources.groovy:
@bean
AuthenticationManager authManager(BaseLdapPathContextSource contextSource) {
LdapBindAuthenticationManagerFactory factory = new LdapBindAuthenticationManagerFactory(contextSource);
factory.setUserDnPatterns("uid={0},DC=edapt,DC=local");
return factory.createAuthenticationManager();
}
Import spring-security-core, spring-security-web and spring-security-config in build.gradle
Attempt to run the app
### Environment Information
Windows 11, OpenJDK 17.0.11
### Example Application
(https://github.com/HarrisLOGIC/stella)
### Version
6.1.1
Contributor guide
Research direction
Reproduce the failure in the linked example application using the embedded Tomcat setup and the dependencies listed in build.gradle. Start with the authManager bean in resources.groovy and trace the filter conversion error; done means the Grails app starts and connects to Active Directory over LDAP without the bean initialization failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java, spring
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100