CAS 6.6.x overlay, Oracle jdbc driver class Not Found, but exists

38 views
Skip to first unread message

Yan Zhou

unread,
Feb 7, 2024, 10:38:28 AM2/7/24
to CAS Community
Hello, 

cas.log complains, it cannot find jdbc driver class, but it exists in cas.war and also declared in gradle dependency.  Can anyone suggest what to do? 

thanks!

I have a CAS 6.6.12 overlay,  in build.gradle, i have the following:

implementation "org.apereo.cas:cas-server-support-jdbc"
implementation "org.apereo.cas:cas-server-support-jdbc-authentication"
implementation "org.apereo.cas:cas-server-support-jdbc-drivers"
implementation "org.apereo.cas:cas-server-support-jpa-hibernate"

in cas.properties.

cas.authn.jdbc.query[0].name=MyCustomDatabaseAuthenticationHandler
cas.authn.jdbc.query[0].driver-class=oracle.jdbc.driver.OracleDriver
cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.Oracle12cDialect
cas.authn.jdbc.query[0].url=jdbc:oracle:thin:@(description=(ADDRESS=(PROTOCOL=TCP)(......)

When I build cas.war, I can see ojdbc10-19.3.0.0.jar in WEB-INF/lib,
but when I start CAS, cas.log still has the following error,
it does work fine with authN via database, but not sure why it cannot find driver.
driverClassName=oracle.jdbc.driver.OracleDriver was not found.
2024-02-07 10:12:55,769 WARN [https-jsse-nio-8543-exec-5] [com.zaxxer.hikari.HikariConfig] - <3ad14adb-01bc-4a19-92e8-4187ab797f10 - idleTimeout is close to or more than maxLifetime, disabling it.>
2024-02-07 10:12:55,769 INFO [https-jsse-nio-8543-exec-5] [com.zaxxer.hikari.HikariDataSource] - <3ad14adb-01bc-4a19-92e8-4187ab797f10 - Starting...>
2024-02-07 10:12:55,806 WARN [https-jsse-nio-8543-exec-5] [com.zaxxer.hikari.util.DriverDataSource] - <Registered driver with driverClassName=oracle.jdbc.driver.OracleDriver was not found, trying direct instantiation.>
2024-02-07 10:12:56,766 INFO [https-jsse-nio-8543-exec-5] [com.zaxxer.hikari.pool.HikariPool] - <3ad14adb-01bc-4a19-92e8-4187ab797f10 - Added connection oracle.jdbc.driver.T4CConnection@6d4f10b1>
2024-02-07 10:12:56,768 INFO [https-jsse-nio-8543-exec-5] [com.zaxxer.hikari.HikariDataSource] - <3ad14adb-01bc-4a19-92e8-4187ab797f10 - Start completed.>

== END ==
Reply all
Reply to author
Forward
0 new messages