As Andy Ng has already stated you need to include the database driver, 
oracle have there own maven repository that all you need is logon 
credentials to use. Just be careful oracle include alot of dependencies 
that are not required and actually cause problems. Specifically exclude 
"com.oracle.jdbc.xmlparserv2" it complains about a missing dependency.

Oracle maven repository 
<https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm>

On Wednesday, 22 August 2018 01:49:46 UTC+10, Ranga Nadha wrote:
>
> Hi Everyone,
>
> We are using CAS 5.1.8 and I am trying to connect to the database for 
> authentication purpose.
>
> I have followed the below procedure but I am getting exceptions.
>
>
>    - Downloaded the CAS 5.1.8
>    - Modify POM.xml with the following dependency
>    
> <dependency>
>  <groupId>org.apereo.cas</groupId>
>  <artifactId>cas-server-support-jdbc</artifactId>
>  <version>${cas.version}</version>
>  <exclusions>
>  <exclusion>
>  <artifactId>log4j-slf4j-impl</artifactId>
>  </exclusion>
>  <exclusion>
>  <groupId>org.codehaus.groovy</groupId>
>  <artifactId>groovy-jsr223</artifactId>
>  </exclusion>
>  </exclusions> 
> </dependency>
> <dependency>
>  <groupId>org.apereo.cas</groupId>
>  <artifactId>cas-server-support-jdbc-drivers</artifactId>
>  <version>${cas.version}</version>
> </dependency>
> <dependency>
>  <groupId>org.apereo.cas</groupId>
>  <artifactId>cas-server-support-jdbc-authentication</artifactId>
>  <version>${cas.version}</version>
> </dependency>
>
>    - Build cas project using mvn clean install.
>    - Take the war file and deploy in tomcat.
>    - In the extracted cas war.
>    - Go to Tomcat/webapps/cas/WEB-INF/classes/appliation.properties and 
>    add the below properties.
>    
> cas.authn.jdbc.query[0].sql=SELECT * FROM USERS WHERE USER_ID=?
> cas.authn.jdbc.query[0].url=jdbc:oracle:thin:@xxx.xxxx.local:1521:db12c
> cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.Oracle12cDialect
> cas.authn.jdbc.query[0].user=xxxx
> cas.authn.jdbc.query[0].password=xxxx
> cas.authn.jdbc.query[0].driverClass=oracle.jdbc.OracleDriver
> cas.authn.jdbc.query[0].fieldPassword=PASSWORD
> cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
> cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
> cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=SHA1
> cas.authn.jdbc.query[0].passwordEncoder.secret=
> cas.authn.jdbc.query[0].passwordEncoder.strength=16
>
>
> cas.authn.accept.users=
> logging.level.org.apereo=DEBUG
>
> *I am getting the below error*
>
> 2018-08-21 21:00:02,828 DEBUG 
> [org.apereo.cas.adaptors.jdbc.config.CasJdbcAuthenticationConfiguration] - 
> <Created and mapped principal attributes [{givenName=givenNa
> me, sn=sn, cn=commonName}] for 
> [jdbc:oracle:thin:@xxxx.xxxx.local:1521:dev12c]...>
> 2018-08-21 21:00:02,870 ERROR [com.zaxxer.hikari.HikariConfig] - <Failed 
> to load class of driverClassName oracle.jdbc.OracleDriver in HikariConfig 
> class classloader
> ParallelWebappClassLoader
>   context: cas
>   delegate: false
> ----------> Parent Classloader:
> java.net.URLClassLoader@13221655
> >
> 2018-08-21 21:00:02,870 ERROR [org.apereo.cas.configuration.support.Beans] 
> - <Error creating DataSource: [Failed to load class of driverClassName 
> [oracle.jdbc.Oracle
> Driver] in either of HikariConfig class loader or Thread context 
> classloader]>
>
> Can any one help to resolve this issue.
>
> Thanks in advance,
>
> Thanks,
> Pandu Ranga T.
>

-- 
- 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/0e06b72e-10fd-4172-919c-0939683ca9b6%40apereo.org.

Reply via email to