Got at least 5 replies.. but then all said they were out of office... :)
 

--- On Sat, 2012/2/18, [email protected] <[email protected]> wrote:












Marvin,
Thank you  for the comments.

Unfortunately, I don't know how to implement what you said. 

Is it like 
(1) <property name="jdbcTemplate " ref="something"/> 
or
(2) <property name="jdbcTemplate " value="something"/> 

That is, "ref" or value? And, what goes in "something"?

I assumed I can add this line just after <property name="fieldEmail"> below, 
correct?

Can I also do the same for "searchBase - may not be null" error? In that case, 
what what should I put in "something"?

**

I have renamed the setter method for dataSource, and I am learning to user the 
Maven overlay method.

Thanks again for your guidance.





--- On Thu, 2012/2/16, Marvin S. Addison <[email protected]> wrote:



> Error creating bean with name 
> 'org.jasig.cas.authentication.principal.CredentialsToJdbcAttributePrincipalResolver#4f5264db'
>  defined in
> ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Initialization 
> of bean failed; nested exception is 
> org.springframework.beans.factory.BeanInitializationException:
> Bean state is invalid: jdbcTemplate - may not be null; searchBase - may not 
> be null

Problem is that you didn't set the jdbcTemplate property on that bean in your 
Spring wiring:

>                  <!-- Coming from parentCAS -->
>         <bean 
> class="org.jasig.cas.authentication.principal.CredentialsToJdbcAttributePrincipalResolver">
> 
>           <property name="credentialsToPrincipalResolver">
>            <bean 
> class="myorg.cas.PrincipalBearingCredentialsToPrincipalResolver" />
>           </property>
> 
>           <property name="filter" value="(mappingField=%u)" />
> 
>           <property name="principalAttributeName" value="userId" />
> 
>           <property name="tableUserTable"><value>userTable</value></property>
>        <property name="fieldUserId"><value>userId</value></property>
>        <property name="fieldEmail"><value>email</value></property>
>         </bean>

Hopefully it's clear to you what's missing and what's needed to fix. You might 
also consider renaming the setter method name to reflect that you're setting a 
DataSource instead of a ContextSource.

I'd strongly recommend you use 
https://wiki.jasig.org/display/CASUM/Best+Practice+-+Setting+Up+CAS+Locally+using+the+Maven2+WAR+Overlay+Method
 for managing your custom components if you're not already.

M

-- 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
-- 
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