I'm coding with JavaEE and trying to access Oracle 18c database from "eclipse 2018-09" I used ojdbc8 and the ping succeeded, but I have this error : "ORA-28040: No matching authentication protocol". After some research i found out that I should set the values of the "SQLNET.ALLOWED_LOGON_VERSION_SERVER=11" and "SQLNET.ALLOWED_LOGON_VERSION_CLIENT=11" in sqlnet.ora file I didn't found them in this file so I added them but it still doesn't work. Anyone can help me ?
package controleur;
/* connexion à la base de données*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.TimeZone;
import java.sql.*;
public class AccessDB {
public static void main(String [] args) {
//Load the Oracle JDBC driver
Connection conn = null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver") ;
System.out.println("Oracle JDBC driver loaded ok.");
}
catch (Exception e) {
System.err.println("Exception: "+e.getMessage());
}
//The connection
try {
String url="jdbc:oracle:thin:@localhost:1521:XE";
conn = DriverManager.getConnection(
url, "system", "liza");
System.out.println("Connected with @localhost:1521:XE.");
} catch (Exception e) {
System.err.println("Exception: "+e.getMessage());
}
}
}