簡體   English   中英

應用服務器啟動時的Spring Security LDAP配置BeanCreationException

[英]Spring Security LDAP Configuration BeanCreationException on app server startup

我正在嘗試將Spring 3.1應用程序連接到內部Zimbra LDAP服務器。 我正在做某事,可能非常愚蠢,看不到問題所在。 我確定我定義的組和用戶群以及過濾器術語可能存在問題,但這不應該在應用服務器啟動時引起BeanCreationException,不是嗎? 我可以用另一雙眼睛...

例外的簡短版本:

“無法將LdapAuthenticationProvider轉換為屬性提供者[0]的必需類型AuthenticationProvider。”

完整的例外:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.config.authentication.AuthenticationManagerFactoryBean] while setting bean property 'parent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#16': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'providers'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.ldap.authentication.LdapAuthenticationProvider] to required type [org.springframework.security.authentication.AuthenticationProvider] for property 'providers[0]': no matching editors or conversion strategy found

相關的Spring配置文件條目:

<security:authentication-manager>
    <security:ldap-authentication-provider
        group-search-filter="member={0}"
        group-search-base="ou=groups"
        user-search-base="ou=people"
        user-search-filter="uid={0}"
    />        
</security:authentication-manager>

<security:ldap-server url="ldap://<correct IP and port>" manager-dn="uid=zimbra,cn=admins,cn=zimbra" manager-password="<private>" />

感謝您提供的任何見解!

看來您所包含的Spring庫之間不匹配。 您需要確保您的Spring Security LDAP庫與其他Spring Security庫版本匹配。

例如:

spring-security-web-3.1.0.RELEASE.jar
spring-security-core-3.1.0.RELEASE.jar
spring-security-config-3.1.0.RELEASE.jar
spring-security-ldap-3.1.0.RELEASE.jar

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM