You didn't mention what version of CAS you're using.  Newer versions of CAS
use the latest PersonDirectory which may have changed its API.   Based on
your error, that'd be my guess (my guess is our documentation also has an
old example ;-))


On Tue, Feb 2, 2010 at 9:50 AM, Markus Kosubek <
[email protected]> wrote:

> Hallo,
>
> iam trying to fill up my principals attributes with attributes from our
> ldap and get following error in cas.log:
>
> (...)
> 2010-02-02 15:27:33,543 ERROR
> [org.springframework.web.context.ContextLoader] - Context initialization
> failed
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'centralAuthenticationService' defined in ServletContext
> resource [/WEB-INF/spring-configuration/applicationContext.xml]: Cannot
> resolve reference to bean 'authenticationManager' while setting bean
> property 'authenticationManager'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'authenticationManager' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Cannot create inner bean
> 'org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver#63f8247d'
> of type
> [org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver]
> while setting bean property 'credentialsToPrincipalResolvers' with key [2];
> nested exception is org.springframework.beans.factory.BeanCreationException:
> Error creating bean with name
> 'org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver#63f8247d'
> defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]:
> Cannot resolve reference to bean 'attributeRepository' while setting bean
> property 'attributeRepository'; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'attributeRepository' defined in ServletContext resource
> [/WEB-INF/deployerConfigContext.xml]: Error setting property values; nested
> exception is org.springframework.beans.NotWritablePropertyException: Invalid
> property 'query' of bean class
> [org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao]: Bean
> property 'query' is not writable or has an invalid setter method. Does the
> parameter type of the setter match the return type of the getter?
>
> (...)
>
> My deployerConfig.xml:
> (...)
> <bean id="authenticationManager"
> class="org.jasig.cas.authentication.AuthenticationManagerImpl">
> <property name="credentialsToPrincipalResolvers">
>            <list>
>                (...)
>                <bean
> class="org.jasig.cas.authentication.principal.CredentialsToLDAPAttributePrincipalResolver">
>                    <property name="credentialsToPrincipalResolver">
>                        <bean
> class="org.jasig.cas.adaptors.x509.authentication.principal.X509CertificateCredentialsToDistinguishedNamePrincipalResolver"/>
>                    </property>
>                    <property name="filter" value="entrydn=%u"/>
>                    <property name="principalAttributeName" value="uid"/>
>                    <property name="searchBase" value="o=myCompany,c=de"/>
>                    <property name="contextSource" ref="contextSource"/>
>                    <property name="attributeRepository"
> ref="attributeRepository" />
>                </bean>
>            </list>
> </property>
>
> (...)
>
> <bean id="attributeRepository"
> class="org.jasig.services.persondir.support.ldap.LdapPersonAttributeDao">
>        <property name="baseDN" value="o=myCompany,c=de" />
>        <property name="query" value="(uid={0})" />
>        <property name="contextSource" ref="contextSource" />
>        <property name="ldapAttributesToPortalAttributes">
>            <map>
>                <entry key="sn" value="Name"/>
>            </map>
>        </property>
> </bean>
>
> We want to let the user authenticate with their x509-certificates, use the
> dn for a ldap-lookup and then using the attribute 'uid' from our ldap as
> principal for ilias (ilias.de). The authentication generally works and
> even the ldap-lookup which is configured in my referenced
> 'contextSource'-Bean looks good, but when i inserted the part to populate
> the principals attributes like described here:
> http://www.ja-sig.org/wiki/display/CASUM/Attributes
>
> i get this incomprehensible error described above...
>
> The api
>
> http://developer.jasig.org/projects/person-directory/1.1.1/apidocs/org/jasig/services/persondir/support/ldap/LdapPersonAttributeDao.html
> shows me that there has to be a property with the name 'query' an that it
> has to be a string, what is given imo.
>
> What is the problem here?
>
> Thx in advance
> Markus
>
> --
> Zentrale der Fraunhofer-Gesellschaft e.V.
> Markus Kosubek, Abt. C7 - Kommunikationsmanagement
> Tel: +49 2241 14 -2114; Fax: -42114
> Schloss Birlinghoven
> 53754 Sankt Augustin
>
> --
> You are currently subscribed to [email protected] as:
> [email protected]
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to