I've been successful in getting CAS 3.3.3 up and running:
* Authenticating using LDAP/Active Directory
* Services running, and "editable"
* Services using it
Now I'm trying to get persistance working for the services, using MySQL. I
followed (as best I could) the instructions at
http://www.ja-sig.org/wiki/display/CASUM/Configuring, but upon startup I'm
getting a lot of errors (which can be seen at http://pastebin.ca/1575497),
the first of which is:
ERROR [org.springframework.web.context.ContextLoader] - <Context
initialization failed>
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'validationAnnotationBeanPostProcessor' defined in ServletContext
resource [/WEB-INF/spring-configuration/applicationContext.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor#0':
Cannot create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframe
My deployerConfigContext.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver"
/>
<bean
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver"
/>
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
p:httpClient-ref="httpClient" />
<bean id="ldapActiveDirectory"
class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
<property name="filter" value="uid=%u"
/>
<property name="searchBase"
value="dc=example,dc=tld" />
<property name="contextSource"
ref="ldapContext" />
<property name="scope" value="2" />
<property name="timeout" value="120" />
</bean>
<bean id="ldapSecondaryAccount"
class="org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler" >
<property name="filter" value="uid=%u"
/>
<property name="searchBase"
value="DC=example,DC=tld" />
<property name="contextSource"
ref="ldapContext" />
<property name="scope" value="2" />
<property name="timeout" value="120" />
</bean>
</list>
</property>
</bean>
<bean id="ldapContext"
class="org.springframework.ldap.core.support.LdapContextSource">
<property name="pooled" value="true"/>
<property name="urls">
<list>
<value>ldap://dc1.example.tld/</value>
<value>ldap://dc2.example.tld/</value>
</list>
</property>
<property name="userDn"
value="CN=adaccess,DC=example,DC=tld"/>
<property name="password" value="********"/>
<property name="baseEnvironmentProperties">
<map>
<entry>
<key>
<value>java.naming.security.authentication</value>
</key>
<value>simple</value>
</entry>
</map>
</property>
</bean>
<bean id="userDetailsService"
class="org.springframework.security.userdetails.memory.InMemoryDaoImpl">
<property name="userMap">
<value>
someuser=notused,ROLE_ADMIN
</value>
</property>
</bean>
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.StubPersonAttributeDao">
<property name="backingMap">
<map>
<entry key="uid" value="uid" />
<entry key="orgPersonAffiliation"
value="orgPersonAffiliation" />
<entry key="groupMembership"
value="groupMembership" />
</map>
</property>
</bean>
<bean id="serviceRegistryDao"
class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
p:entityManagerFactory-ref="entityManagerFactory" />
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="generateDdl" value="true"/>
<property name="showSql" value="true" />
</bean>
</property>
<property name="jpaProperties">
<props>
<prop
key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop
key="hibernate.hbm2ddl.auto">create-drop</prop>
</props>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory"
ref="entityManagerFactory"/>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean
id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource"
p:driverClass="org.mysql.jdbc.Driver"
p:url="jdbc:msql://localhost:3306/cas_service_registry?autoReconnect=true"
p:password="*********"
p:user="CAS" />
</beans>
My cas.properties:
cas.securityContext.serviceProperties.service=https://hermes.domain.tld:8443/cas/services/j_acegi_cas_security_check
cas.securityContext.casProcessingFilterEntryPoint.loginUrl=https://hermes.domain.tld:8443/cas/login
cas.securityContext.ticketValidator.casServerUrlPrefix=https://hermes.domain.tld:8443/cas
cas.themeResolver.defaultThemeName=default
cas.viewResolver.basename=default_views
#host.name=cas
host.name=hermes.domain.tld
#database.hibernate.dialect=org.hibernate.dialect.OracleDialect
database.hibernate.dialect=org.hibernate.dialect.MySQLDialect
#database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
Any help is appreciated!
Thanks,
Andrew
--
View this message in context:
http://www.nabble.com/Error-creating-bean-with-name-%27validationAnnotationBeanPostProcessor%27-tp25530851p25530851.html
Sent from the CAS Users mailing list archive at Nabble.com.
--
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