[cas-dev] MapBackedAttributeRepository

Marvin S. Addison serac at exchange.vt.edu
Fri Jun 1 16:59:35 EDT 2007


I'm trying to instantiate MapBackedAttributeRepository in Spring IOC
container, and getting the following error:

NotWritablePropertyException: Invalid property 'attributes' of bean
class [org.jasig.cas.services.MapBackedAttributeRepository]: Bean
property 'attributes' is not writable or has an invalid setter method.
Does the parameter type of the setter match the return type of the
getter?

Bean XML:

<bean id="attributeRepository"
  class="org.jasig.cas.services.MapBackedAttributeRepository">
  <property name="attributes">
  <map>
  <entry key="uid">
    <bean class="org.jasig.cas.services.Attribute">
    <property name="id" value="uid" />
    <property name="name" value="uid" />
    </bean>
  </entry>
  <entry key="eduPersonAffiliation">
    <bean class="org.jasig.cas.services.Attribute">
    <property name="id" value="eduPersonAffiliation" />
    <property name="name" value="eduPersonAffiliation" />
    </bean>
  </entry>
  <entry key="groupMembership">
    <bean class="org.jasig.cas.services.Attribute">
    <property name="id" value="groupMembership" />
    <property name="name" value="groupMembership" />
    </bean>
  </entry>
  </map>
  </property>
</bean>

Can anyone recommend a fix or point me at an example of how to
instantiate one of these?

Thanks,
Marvin Addison
-- 
Application Developer
Middleware Services
Virginia Tech


More information about the cas-dev mailing list