I figure it out except I can't figure out how to get to a bean that is 
nested in a propertie nested in a bean...
Here is my example
        <bean id="authenticationManager" class=
"org.jasig.cas.authentication.AuthenticationManagerImpl">
                ....... MORE
                <property name="authenticationHandlers">
                        <list>
                                ...... MORE
                                <bean class=
"org.jasig.cas.adaptors.ldap.BindLdapAuthenticationHandler">
                                        <property name="filter" value=
"sAMAccountName=%u" />
                                        <property name="searchBase" value=
"" />
                                        <property name="contextSource" ref
="contextSource" />
                                        <property name=
"ignorePartialResultException" value="yes" />
                                </bean>

                        </list>
                </property>
        </bean>
How do I get to searchbase?
I tried giving the sub bean an Id="ldapBinder" and referencing it by 
authenticationManager.authenticationHandlers.ldapBinder.searchBase=DC=dev,DC=jbhunt,DC=com
but I get 

The Spring ContextLoaderListener we wrap threw on contextInitialized. But 
for our having caught this error, the web application context would not 
have initialized.org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'centralAuthenticationService' defined in 
ServletContext resource 
[/WEB-INF/spring-configuration/applicationContext.xml]: Cannot resolve 
reference to bean 'authenticationManager' while setting bean property 
'authenticationManager'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'authenticationManager' defined in ServletContext resource 
[/WEB-INF/deployerConfigContext.xml]: Error setting property values; 
nested exception is 
org.springframework.beans.NotWritablePropertyException: Invalid property 
'authenticationHandlers.ldapBinder.searchBase' of bean class 
[org.jasig.cas.authentication.AuthenticationManagerImpl]: Nested property 
in path 'authenticationHandlers.ldapBinder.searchBase' does not exist; 
nested exception is 
org.springframework.beans.NotReadablePropertyException: Invalid property 
'authenticationHandlers' of bean class 
[org.jasig.cas.authentication.AuthenticationManagerImpl]: Bean property 
'authenticationHandlers' is not readable or has an invalid getter method: 
Does the return type of the getter match the parameter type of the setter?

Anyideas?

Chris Whittle
SWAT Team Developer
J.B. Hunt Transport Service, Inc.
Office Phone:(479) 419-3122
Ext:73122
Fax Phone:(479) 820-1769
[email protected]
What's your next move?TM
Intermodal | Dedicated | Truckload | LTL | Delivery | Refrigerated | 
Flatbed | Expedited 



Eric Pierce <[email protected]> 
Sent by: [email protected]
06/23/2009 08:26 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: [cas-user] Externalizing Info used in deployerConfigContext.xml






I'm using PropertyOverrideConfigurer and an external config file to build 
a single WAR for our dev and production servers.  I added the following 
bean to deployerConfigContext.xml and auditTrailContext (for logging):

     <bean 
class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"
        p:location="file:/usr/local/etc/cas-connection.properties"
        p:ignoreResourceNotFound="false" />

And then all of the configuration in the rest of the file is generic -- 
I've got all of the config options that are the same across all my servers 
(search filters, baseDN, etc) but all of the connection parameters are 
blank.  Then /usr/local/etc/cas-connection.properties has all of the 
server-specific info:

contextSource.urls=ldap://localhost:389,ldap://example.edu:389
contextSource.userDn=uid=admin,o=example.edu
contextSource.password=secret

ServicesdataSource.driverClassName=com.mysql.jdbc.Driver
ServicesdataSource.url=jdbc:mysql://localhost:3306/cas?autoReconnect=true
ServicesdataSource.username=root
ServicesdataSource.password=secret

AuditDataSource.driverClassName=com.mysql.jdbc.Driver
AuditDataSource.url=jdbc:mysql://localhost:3306/audit?autoReconnect=true
AuditDataSource.username=root
AuditDataSource.password=secret


  Eric Pierce, RHCE -- University of South Florida -- (813) 974-8868 -- 
[email protected]


On Mon, Jun 22, 2009 at 3:02 PM, Marvin Addison <[email protected]> 
wrote:
Another option would be to use
ServletContextPropertyPlaceholderConfigurer or
PropertyPlaceholderConfigurer classes to load placeholders into your
Spring config.  For example, you could have a NAS share that is
exported to all your hosts at the same path and use
PropertyPlaceholderConfigurer to suck in property placeholders into
your Spring context config.  A solution similar to this was preferable
to us since we didn't want the complexity of JNDI.

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

<<image/gif>>

Reply via email to