1
我試圖將我的Spring 3.1應用程序連接到我的內部Zimbra LDAP服務器。我正在做一些可能非常愚蠢的事情,我看不出問題所在。我確定可能存在與我定義的組和用戶羣和過濾條件有關的問題,但是應該不會在應用服務器啓動時導致BeanCreationException,應該如何?我可以用另一雙眼睛......Spring Security LDAP Configuration在應用服務器啓動時發生BeanCreationException
異常的短版:
「不能將LdapAuthenticationProvider可疑轉換爲所需類型的AuthenticationProvider財產提供商[0]」
完整的例外:
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>" />
感謝您提供的任何見解!
它可能什麼都沒有做的異常,但參數賦值'用戶的搜索基=「OU =人」'可能丟失的最右邊的部分DN,除非你的命名上下文實際上是「ou = people」。 – 2012-07-20 12:00:47