Environment:
Jdk:jdk1.5.0_04
Database: Oracle 12c
Because the JDK version is too low, you cannot use a jar such as Ojdbc6.jar to connect 12c. You can only use the old version of Ojdbc14.jar to connect to the data.
Using the old version Ojdbc14.jar to connect 12c will be reported: Ora-28040:no Matching authentication protocol
Workaround:
The connection URL must be in the new version of the JDBC:ORACLE:THIN:@//IP:PORT/TESTDB format, or the JDBC driver package will be using the original Ojdbc14.jar
Modify the $oracle_home/network/admin/sqlnet.ora file of the database, do not create this file yourself manually, set the Sqlnet.allowed_logon_version=8
Ensure that the parameter is in effect before use.
Reference: http://blog.csdn.net/kongxx/article/details/44887379
Http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html
Http://www.oracle.com/technetwork/database/focus-areas/application-development/index-099369.html
Http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_02
Http://docs.oracle.com/cd/B28359_01/network.111/b28317/sqlnet.htm#BIIEAFHA
java1.5 Connection oracle12c