1

Problem Statement:

We are doing a migration activity in which we have migrated DATABASE from ORACLE 11g to ORACLE 12c. After upgrade one of our application which is using jdk 6 with ojdbc6.jar (JDBC Driver) is not able to connect the 12c database.

Below error we are getting :

java.sql.SQLException: ORA-28040: 
No matching authentication protocol

after Upgrade Database to 12c

Configuration

  • JDK Version : 1.6
  • JDBC Driver : ojdbc6.jar
  • Database Version : Oracle 12c
  • SQLNET.ALLOWED_LOGON_VERSION_SERVER = 11
  • SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 11

Workaround tried:

  • 1) We tried to run a simple jdbc application with jdk1.6 and ojdbc6.jar it was successful. Also it is as per Oracle Compatibility matrix.
  • 2) We asked to update the parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 but security team cannot do it as it does not comply on security standards.

Please suggest how we should proceed forward to fix this issue.

Nicolás Alarcón Rapela
  • 2,714
  • 1
  • 18
  • 29
avi_panday
  • 67
  • 1
  • 3
  • 13
  • 2
    Possible duplicate of [ORA-28040: No matching authentication protocol : Oracle 12c Upgrade](https://stackoverflow.com/questions/31141392/ora-28040-no-matching-authentication-protocol-oracle-12c-upgrade) – Derviş Kayımbaşıoğlu Jan 25 '19 at 07:09
  • Hi Simonare - whatever solution was provided there we tried. Bit issue is still not fixed. And moreover every solution is talking about the changes in sqlnet.allowed_version_server parameter to 8 but as per compliance it is not allowed. Any suggestions ? – avi_panday Jan 25 '19 at 07:34
  • If you have oracle support, you can open SR to the oracle team – Derviş Kayımbaşıoğlu Jan 25 '19 at 07:35
  • but please keep in mind that oracle is suggesting to upgrade ojdbc driver. can you do that? – Derviş Kayımbaşıoğlu Jan 25 '19 at 07:37
  • check this as well: https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:9533918300346989898 – Derviş Kayımbaşıoğlu Jan 25 '19 at 07:39
  • Thanks a lot Simonare - to upgrade the driver we need to upgrade jdk also. We are looking into this option. – avi_panday Jan 25 '19 at 07:50
  • If you have option to do so, just do it! – Derviş Kayımbaşıoğlu Jan 25 '19 at 07:53
  • Solved: Actually the Oracle Driver it was using was coming from classpath of weblogic.jar. we checked from WL_HOME\server\lib and found that their ojdbc14.jar was present. So we explicitly added ojdbc6.jar before all jars in classpath. From Oracle doc -(https://docs.oracle.com/cd/E17904_01/web.1111/e13737/third_party_drivers.htm#JDBCA233 ) " If you plan to use a different version of any of the drivers installed with WebLogic Server, you can replace the driver file in WL_HOME\server\lib with an updated version of the file or add the new file to the front of your CLASSPATH. " – avi_panday Jan 29 '19 at 14:36

1 Answers1

1

The problem was then weblogic.jar and from the classpath of weblogic.jar, ojdbc14.jar was being referred. We checked in WL_HOME\server\lib library and found that ojdbc14.jar was there. We just let keep it there but copied ojdbc6.jar in some external directory and loaded same in CLASSPATH before all jars. Below is from oracle docs-

This driver is installed in the WL_HOME\server\lib folder (where WL_HOME is the folder where WebLogic Server is installed) with weblogic.jar. The manifest in weblogic.jar lists this file so that it is loaded when weblogic.jar is loaded (when the server starts). Therefore, you do not need to add this JDBC driver to your CLASSPATH. If you plan to use a third-party JDBC driver that is not installed with WebLogic Server, you must install the drivers, which includes updating your CLASSPATH with the path to the driver files, and may include updating your PATH with the path to database client files. See "Supported Database Configurations" on the Oracle Fusion Middleware Supported System Configurations page at http://www.oracle.com/technology/software/products/ias/files/fusion_certification.htmlOpens a new window.

If you plan to use a different version of any of the drivers installed with WebLogic Server, you can replace the driver file in WL_HOME\server\lib with an updated version of the file or add the new file to the front of your CLASSPATH.

So if you are facing the same issue I would like to suggest-
1) Check for the Oracle driver (ojdbc) - as the most post on StackOverflow suggest same. You can check ojdbc driver compatibity here
2) If you cannot change driver immediately the change below in sqlnet.ora

SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8

(SQLNET.ALLOWED_LOGON_VERSION is depreciated in 12c. Also, please be noted that In 12c, the default value for the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter has been updated to “11”. This means that database clients using pre-11g JDBC thin drivers cannot authenticate to 12.1 database servers unless the parameter is set to the old default of “8”) For your reference, please check-
https://docs.oracle.com/database/121/UPGRD/deprecated.htm#UPGRD60010
https://docs.oracle.com/database/121/UPGRD/afterup.htm#UPGRD60157

Thanks.

avi_panday
  • 67
  • 1
  • 3
  • 13