Unable to read meta-data for class org.apereo.cas.config.SurrogateJdbcAuthenticationConfiguration>

717 views
Skip to first unread message

Robert Bond

unread,
Aug 22, 2018, 5:58:21 PM8/22/18
to CAS Community

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!

FH

unread,
Oct 22, 2018, 9:24:41 AM10/22/18
to CAS Community
Hello,


Same problem with 5.2.8 


cas    | 2018-10-22 13:21:53,437 WARN [org.apereo.cas.web.CasWebApplicationContext] - <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>
on

Anyone have tried the surrogate JDBC ?  if you have a working config, it will be nice.

Anyway thanks.
Reply all
Reply to author
Forward
0 new messages