yaojinyang
Apr 18th, 2007, 10:57 AM
Hi,
I am trying to deploy a CAS3 server by using my existing UserDetailsService implementation as plugin. The existing implementation uses JPA for accessing user repository.
I have copied all necessary source and libraries to CAS's localplugin directory and can successfully compile the source. But, when I deployed the CAS there are some errors (required configuration files were provided to war file as well.). Checking the debug information, first, I noticed that 'user' entity bean, which used by userDetailServices, was not mapped to database table. Then, I noticed there are some unusual info (not eligible for auto-proxying) about some of beans (the following is a sample about the dataSource bean). I guess this might cause the problem.
I am sure the source code from my existing UserDetailsService implementation is fine. The problem occurs only when I used it as CAS's plugin.
Does anyone have any clue about the real reason and how to solve it? Anyway, thanks in advance.
Yaojin
P.s. in th end of this post, you can also find a part of the deployerConfigContext.xml
************************************************
2007-04-18 11:43:40,570 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Creating shared instance of singleton bean 'dataSource'
2007-04-18 11:43:40,570 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Creating instance of bean 'dataSource' with merged definition [Root bean: class [org.springframework.jdbc.datasource.DriverManagerD ataSource]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext-jpa.xml]]
2007-04-18 11:43:40,580 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
2007-04-18 11:43:40,610 INFO [org.springframework.jdbc.datasource.DriverManagerD ataSource] - Loaded JDBC driver: com.mysql.jdbc.Driver
2007-04-18 11:43:40,610 INFO [org.springframework.web.context.support.XmlWebAppl icationContext] - Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
*********************************************'
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManager Impl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean
class="org.jasig.cas.authentication.principal.UsernamePas swordCredentialsToPrincipalResolver" />
<bean
class="org.jasig.cas.authentication.principal.HttpBasedSe rviceCredentialsToPrincipalResolver" />
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean
class="org.jasig.cas.authentication.handler.support.HttpB asedServiceCredentialsAuthenticationHandler">
<property
name="httpClient"
ref="httpClient" />
</bean>
<bean
class="org.acegisecurity.adapters.cas3.CasAuthenticationH andler">
<property name="authenticationManager" ref="acegiAuthenticationManager"/>
</bean>
</list>
</property>
</bean>
<bean id="acegiAuthenticationManager" class="org.acegisecurity.providers.ProviderManager">
<property name="providers">
<list>
<ref bean="daoAuthenticationProvider"/>
</list>
</property>
</bean>
<bean id="daoAuthenticationProvider"
class="org.acegisecurity.providers.dao.DaoAuthenticationP rovider">
<property name="userDetailsService" ref="userDetailsService" />
<property name="passwordEncoder" ref="sha1PasswordEncoder"/>
<property name="userCache" ref="userCache" />
</bean>
I am trying to deploy a CAS3 server by using my existing UserDetailsService implementation as plugin. The existing implementation uses JPA for accessing user repository.
I have copied all necessary source and libraries to CAS's localplugin directory and can successfully compile the source. But, when I deployed the CAS there are some errors (required configuration files were provided to war file as well.). Checking the debug information, first, I noticed that 'user' entity bean, which used by userDetailServices, was not mapped to database table. Then, I noticed there are some unusual info (not eligible for auto-proxying) about some of beans (the following is a sample about the dataSource bean). I guess this might cause the problem.
I am sure the source code from my existing UserDetailsService implementation is fine. The problem occurs only when I used it as CAS's plugin.
Does anyone have any clue about the real reason and how to solve it? Anyway, thanks in advance.
Yaojin
P.s. in th end of this post, you can also find a part of the deployerConfigContext.xml
************************************************
2007-04-18 11:43:40,570 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Creating shared instance of singleton bean 'dataSource'
2007-04-18 11:43:40,570 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Creating instance of bean 'dataSource' with merged definition [Root bean: class [org.springframework.jdbc.datasource.DriverManagerD ataSource]; scope=singleton; abstract=false; lazyInit=false; autowireCandidate=true; autowireMode=0; dependencyCheck=0; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in ServletContext resource [/WEB-INF/applicationContext-jpa.xml]]
2007-04-18 11:43:40,580 DEBUG [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
2007-04-18 11:43:40,610 INFO [org.springframework.jdbc.datasource.DriverManagerD ataSource] - Loaded JDBC driver: com.mysql.jdbc.Driver
2007-04-18 11:43:40,610 INFO [org.springframework.web.context.support.XmlWebAppl icationContext] - Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
*********************************************'
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManager Impl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean
class="org.jasig.cas.authentication.principal.UsernamePas swordCredentialsToPrincipalResolver" />
<bean
class="org.jasig.cas.authentication.principal.HttpBasedSe rviceCredentialsToPrincipalResolver" />
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean
class="org.jasig.cas.authentication.handler.support.HttpB asedServiceCredentialsAuthenticationHandler">
<property
name="httpClient"
ref="httpClient" />
</bean>
<bean
class="org.acegisecurity.adapters.cas3.CasAuthenticationH andler">
<property name="authenticationManager" ref="acegiAuthenticationManager"/>
</bean>
</list>
</property>
</bean>
<bean id="acegiAuthenticationManager" class="org.acegisecurity.providers.ProviderManager">
<property name="providers">
<list>
<ref bean="daoAuthenticationProvider"/>
</list>
</property>
</bean>
<bean id="daoAuthenticationProvider"
class="org.acegisecurity.providers.dao.DaoAuthenticationP rovider">
<property name="userDetailsService" ref="userDetailsService" />
<property name="passwordEncoder" ref="sha1PasswordEncoder"/>
<property name="userCache" ref="userCache" />
</bean>