2

I am upgrading SpringBoot application to 2.1.4.RELEASE from 1.5.10.RELEASE. It is throwing error :-

HikariPool-1 - Failed to execute isValid() for connection, configure connection test query (oracle.jdbc.driver.T4CConnection.isValid(I)Z).

JDBC DatabaseMetaData method not implemented by JDBC driver - upgrade your driver; nested exception is java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.isValid(I)Z

Until now I have tried upgrading ojdbc14 10.2.0.3.0 to ojdbc14 10.2.0.4

Can someone please help point out the oracle driver supported for SpringBoot-2.1.4 and incoming spring data jpa version 2.1.6

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.4.RELEASE</version>
</parent>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>

    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>10.2.0.4</version>
    </dependency>

    <dependency>
        <groupId>com.itextpdf</groupId>
        <artifactId>itextpdf</artifactId>
        <version>5.0.6</version>
    </dependency>

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-spring-boot-starter</artifactId>
        <version>2.17.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-stream</artifactId>
        <version>2.17.0</version>
    </dependency>

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-ftp</artifactId>
        <version>2.15.0</version>
    </dependency>

</dependencies>

1 Answers1

1

Use ojdbc7 or ojdbc8 (JDBC driver certified with JDK8) version, can be found in https://mvnrepository.com/artifact/com.oracle/ojdbc7/12.1.0.2 or directly from Oracle official site (not sure where exactly it is available). Using maven repository for Oracle may give you an error, 'Missing artifact'. So download it and point it in pom.xml, something like following-

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc7</artifactId>
    <version>12.1.0.2</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/ojdbc7-12.1.0.2.jar</systemPath>
</dependency>
pkn.47
  • 33
  • 4