I'm working with Spring Boot application and trying to access an Oracle database. Although it was successfully built, it gives the error below when I am trying to deploy in Kubernetes.
I changed the application.properties
file and pom.xml
file with below configurations:
Application.yml
spring.datasource.url=jdbc:oracle:thin:@<IP>:1521:orcl
spring.datasource.username=<username>
spring.datasource.password=<password>
spring.datasource.driver.class=oracle.jdbc.driver.OracleDriver
POM file
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
Exception
*************************** APPLICATION FAILED TO START *************************** Description: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource: Property: driverclassname Value: oracle.jdbc.OracleDriver Origin: "driverClassName" from property source "source" Reason: Failed to load driver class oracle.jdbc.OracleDriver in either of HikariConfig class loader or Thread context classloader Action: Update your application's configuration
spring.datasource.driver.class=oracle.jdbc.driver.OracleDriver
it should bedriver.class-name
– Penelopa