I am running into an error when setting up jdbc surrogate authentication on 
CAS 5.2.3 .

The error "Unable to read meta-data for class 
org.apereo.cas.config.SurrogateJdbcAuthenticationConfiguration>" leads me 
to think that I am missing some dependency in pom.xml or bad config in 
cas.properties. 


Here is the error:

2018-08-22 16:07:12,034 INFO 
[org.apereo.cas.web.CasWebApplicationServletInitializer] - <The following 
profiles are active: standalone>
2018-08-22 16:07:12,396 WARN 
[org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext]
 
- <Exception encountered during context initialization - cancelling refresh 
attempt: org.springframework.beans.factory.BeanDefinitionStoreException: 
Failed to process import candidates for configuration class 
[org.apereo.cas.web.CasWebApplication]; nested exception is 
java.lang.IllegalStateException: Unable to read meta-data for class 
org.apereo.cas.config.SurrogateJdbcAuthenticationConfiguration>
2018-08-22 16:07:12,404 ERROR [org.springframework.boot.SpringApplication] 
- <Application startup failed>
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to 
process import candidates for configuration class 
[org.apereo.cas.web.CasWebApplication]; nested exception is 
java.lang.IllegalStateException: Unable to read meta-data for class 
org.apereo.cas.config.SurrogateJdbcAuthenticationConfiguration
        at 
org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:556)
 
~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
        at 
org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185)
 
~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
        at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:308)
 
~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]
        at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
 
~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]


Dependencies I added to pom.xml:

<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-surrogate-webflow</artifactId>
<version>${cas.version}</version>
</dependency>
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-support-surrogate-authentication-jdbc</artifactId>
<version>${cas.version}</version>
</dependency>

Here is the relivant config in cas.properties. 

# # Oracle Database Attribute query
cas.authn.surrogate.jdbc.healthQuery= SELECT 1 FROM DUAL
cas.authn.surrogate.jdbc.isolateInternalQueries= false
cas.authn.surrogate.jdbc.url= 
jdbc:oracle:thin:@//hostname:1521/serviceName.example.edu
cas.authn.surrogate.jdbc.dialect= org.hibernate.dialect.Oracle12cDialect
cas.authn.surrogate.jdbc.user= cas_db_login_user
cas.authn.surrogate.jdbc.password= passwordASDF
cas.authn.surrogate.jdbc.driverClass= oracle.jdbc.OracleDriver
# # END Oracle Database Attribute query
cas.authn.surrogate.separator=+
# not sure if this is needed for correct
cas.authn.surrogate.principal=samAccountName
cas.authn.surrogate.jdbc.surrogateSearchQuery=SELECT COUNT(*) FROM 
surrogates WHERE (sysdate between create_date and nvl(expire_date, sysdate 
+ 1)) and login_id=?
cas.authn.surrogate.jdbc.surrogateAccountQuery=SELECT surrogate_id AS 
surrogateAccount FROM surrogates WHERE (sysdate between create_date and 
nvl(expire_date, sysdate + 1)) and login_id=?
# END ORACLE JDBC surrogate login config


If anyone has a working config for jdbc surrogate authentication please 
post it or if you have any thoughts on the error.

Thanks!

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/27a906c0-b98b-4d86-b11b-1358865bf2a6%40apereo.org.

Reply via email to