We are in the process of upgrading CAS from 4.0.7 to 4.1.9 .
We are using an xml based services-configuration file to load the list of registered services.
I am getting this exception when the war file is deployed on tomcat.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servicesManager' defined in ServletContext resource [/WEB-INF/
spring-configuration/applicationContext.xml]: Cannot resolve reference to bean 'serviceRegistryDao' while setting constructor argument; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceRegistryDao' defined in ServletContext resource [
/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean 'listOfRegisteredServices' while setting bean property 'registeredServices'; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'listOfRegisteredServices': Cannot resolve reference to bean 'ABC' while setting bean property 'sourceList' with
key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ABC' defined in ServletContext resource [/WEB-INF/spring-configuration/services-configuration.xml]:
Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'allowedAttributes' of
bean class [org.jasig.cas.services.RegexRegisteredService]: Bean property 'allowedAttributes' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
We are using an InMemoryServiceRegistryDaoImpl in the deployerConfigContext.xml
<bean id="serviceRegistryDao" class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl">
<property name="registeredServices" ref="listOfRegisteredServices" />
</bean>
and below is the code from the services-configuration.xml which seems to be throwing the exception
<bean id="ABC" class="org.jasig.cas.services.RegexRegisteredService">
<property name="id" value="1" />
<property name="name" value="Portal" />
<property name="description" value="Services for Portal Apps" />
<property name="serviceId" value="^(https)://test\.edu/*.*" />
<property name="evaluationOrder" value="1" />
<property name="theme" value="portal_theme"/>
<property name="allowedToProxy" value="true"/>
<property name="allowedAttributes">
<list>
<value>uid</value>
<value>displayName</value>
<value>givenName</value>
</list>
</property>
</bean>
Can we continue to use the xml files for the Services configuration or we need to adopt to the json format?
If we wish to continue using the xml service configuration approach what would be the property to use for defining the allowedattributes?
Thanks
Sourabh