Version of Oracle Jdbc Driver which supports Java 8 and runs on Tomcat 8.5
Asked Answered
E

2

5

I wanted to know the ojdbc version which supports java8 and Tomcat 8.5. Currently I am using ojdbc14_g.jar which gives a version compatibility issue when I start the application. This works with Tomcat 7 but not with Tomcat 8.5.

This works with Tomcat 7 but not with Tomcat 8.5.

Epistaxis answered 15/5, 2019 at 8:30 Comment(0)
L
12

Simply execute the driver and it will tell you:

  • Supported JDK version

    The number present in driver's name identifies supported JRE - ojdbc8 => Java8

  • Supported JDBC standard

  • Supported version of Database server

Note: Oracle should support off-by-one major database version. So drivers version Oracle 11.2.0.4 should be able connect to 10g, 11g, 12c (at least 12.1).

$ java -jar ojdbc6.jar
Oracle 11.2.0.4.0 JDBC 4.0 compiled with JDK6 on Thu_Jul_03_18:17:32_PDT_2014
#Default Connection Properties Resource
#Mon Jun 10 20:13:06 CEST 2019

$ java -jar ojdbc8.jar
Oracle 12.2.0.1.0 JDBC 4.2 compiled with javac 1.8.0_91 on Tue_Dec_13_06:08:31_PST_2016
#Default Connection Properties Resource
#Mon Jun 10 20:13:17 CEST 2019

***** JCE UNLIMITED STRENGTH IS INSTALLED ****

If you have problems connecting using old JDBC drivers you can set SQLNET.ALLOWED_LOGON_VERSION in server's sqlnet.ora. This might work but also you have to deal with supported password formats on DB side. See ALLOWED_LOGON_VERSION. If you do not have user's password stored in the database in proper format, user will not be able to authenticate anyway.

ALLOWED_LOGON_VERSION_SERVER parameter also relates to format how passwords are saved. And also what types of password hashes are generated when you change the password. IMHO You should avoid storing passwords in original 10g format. You can get user password hash details by using this SQL:

SQL> select username, PASSWORD_VERSIONS from dba_users;

USERNAME                       PASSWORD_VERSIONS
------------------------------ -----------------
SYS                            10G 11G 12C
Loquat answered 10/6, 2019 at 18:19 Comment(0)
E
1
    <!-- https://mvnrepository.com/artifact/com.oracle.ojdbc/ojdbc8 -->
    <dependency>
        <groupId>com.oracle.ojdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>19.3.0.0</version>
    </dependency>

This is worked for me.

Epistaxis answered 13/3, 2020 at 9:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.