Thank you. That worked perfectly.

Cheers,
 -Jeremy

From: Misagh Moayyed [mailto:mmoay...@unicon.net]
Sent: Friday, September 25, 2015 1:35 AM
To: cas-user@lists.jasig.org
Subject: RE: [cas-user] LDAP Persisted Services Management 4.1.0

Since you are deploying the management app, try with:

<context:component-scan base-package="org.jasig.cas.adaptors.ldap.services " />

From: Wickham, Jeremy [mailto:jeremy.wick...@msstate.edu]
Sent: Thursday, September 24, 2015 2:21 PM
To: cas-user@lists.jasig.org<mailto:cas-user@lists.jasig.org>
Subject: [cas-user] LDAP Persisted Services Management 4.1.0

I can build the services management webapp and it will deploy flawlessly. When 
I configure an LDAP backed registry warnings are being thrown and the 
application will not startup in Tomcat.

2015-09-24 15:52:07,841 WARN 
[org.springframework.web.context.support.XmlWebApplicationContext] - <Exception 
encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'healthCheckController': Injection of autowired dependencies failed; 
nested exception is org.springframework.beans.factory.BeanCreationException: 
Could not autowire field: private org.jasig.cas.monitor.HealthCheckMonitor 
org.jasig.cas.web.report.HealthCheckController.healthCheckMonitor; nested 
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: 
No qualifying bean of type [org.jasig.cas.monitor.HealthCheckMonitor] found for 
dependency: expected at least 1 bean which qualifies as autowire candidate for 
this dependency. Dependency annotations: 
{@javax.validation.constraints.NotNull(message={javax.validation.constraints.NotNull.message}<mailto:%7b@javax.validation.constraints.NotNull(message=%7bjavax.validation.constraints.NotNull.message%7d>,
 payload=[], groups=[]), 
@org.springframework.beans.factory.annotation.Autowired(required=true)}


Then when I add the HealthCheck to the managementConfigContext.xml I receive 
the following warning:

2015-09-24 15:58:36,269 WARN 
[org.springframework.web.context.support.XmlWebApplicationContext] - <Exception 
encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'singleSignOnSessionsReportController': Injection of autowired 
dependencies failed; nested exception is 
org.springframework.beans.factory.BeanCreationException: Could not autowire 
field: private org.jasig.cas.CentralAuthenticationService 
org.jasig.cas.web.report.SingleSignOnSessionsReportController.centralAuthenticationService;
 nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying 
bean of type [org.jasig.cas.CentralAuthenticationService] found for dependency: 
expected at least 1 bean which qualifies as autowire candidate for this 
dependency. Dependency annotations: 
{@org.springframework.beans.factory.annotation.Autowired(required=true)}<mailto:%7b@org.springframework.beans.factory.annotation.Autowired(required=true)%7d>


I am not understanding why an LDAP backed service registry will be expecting 
these beans to be in the configuaration. Here is the config I have added to the 
managementConfigContext.xml


<context:component-scan base-package="org.jasig.cas" />

       <bean id="serviceRegistryDao"
             class="org.jasig.cas.adaptors.ldap.services.LdapServiceRegistryDao"
             p:connectionFactory-ref="pooledLdapConnectionFactory"
             p:searchRequest-ref="searchRequest"
             p:ldapServiceMapper-ref="ldapServiceMapper" />

       <bean id="ldapServiceMapper"
             
class="org.jasig.cas.adaptors.ldap.services.DefaultLdapRegisteredServiceMapper"/>

    <bean id= "pooledLdapConnectionFactory"
             class= "org.ldaptive.pool.PooledConnectionFactory"
             p:connectionPool-ref="connectionPool" />

    <bean id= "connectionPool"
         class= "org.ldaptive.pool.BlockingConnectionPool"
         init-method="initialize"
         p:poolConfig-ref="ldapPoolConfig"
         p:blockWaitTime="${ldap.pool.blockWaitTime}"
         p:validator-ref="searchValidator"
         p:pruneStrategy-ref="pruneStrategy"
         p:connectionFactory-ref="connectionFactory" />

    <bean id= "ldapPoolConfig" class ="org.ldaptive.pool.PoolConfig"
         p:minPoolSize="${ldap.pool.minSize}"
         p:maxPoolSize="${ldap.pool.maxSize}"
         p:validateOnCheckOut="${ldap.pool.validateOnCheckout}"
         p:validatePeriodically="${ldap.pool.validatePeriodically}"
         p:validatePeriod="${ldap.pool.validatePeriod}" />

    <bean id= "connectionFactory" class ="org.ldaptive.DefaultConnectionFactory"
         p:connectionConfig-ref="connectionConfig" />

    <bean id= "connectionConfig" class ="org.ldaptive.ConnectionConfig"
      p:ldapUrl="${ldap.url}"
      p:connectTimeout="3000"
      p:useStartTLS="false"
      p:connectionInitializer-ref="bindConnectionInitializer" />

    <bean id="bindConnectionInitializer" 
class="org.ldaptive.BindConnectionInitializer"
         p:bindDn= "${ldap.authn.managerDN}" >
         <property name= "bindCredential">
               <bean class= "org.ldaptive.Credential"   
c:password="${ldap.authn.managerPassword}" />
          </property>
        </bean>

    <bean id="searchValidator" class= "org.ldaptive.pool.SearchValidator" />

    <bean id= "pruneStrategy" class ="org.ldaptive.pool.IdlePruneStrategy"
         p:prunePeriod="${ldap.pool.prunePeriod}"
         p:idleTime="${ldap.pool.idleTime}" />

       <bean id="searchRequest"
         class= "org.ldaptive.SearchRequest"
         p:baseDn= "${ldap.baseDn}" />

Any thoughts?

Thanks for your help,
 -Jeremy
________________________
Jeremy Wickham
Senior Systems Analyst
Mississippi State University
jeremy.wick...@msstate.edu<mailto:jeremy.wick...@msstate.edu>




--

You are currently subscribed to 
cas-user@lists.jasig.org<mailto:cas-user@lists.jasig.org> as: 
mmoay...@unicon.net<mailto:mmoay...@unicon.net>

To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user



--

You are currently subscribed to 
cas-user@lists.jasig.org<mailto:cas-user@lists.jasig.org> as: 
jeremy.wick...@msstate.edu<mailto:jeremy.wick...@msstate.edu>

To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to