old jdbc driver generates ORA-28040

I read on note 401934.1 that Oracle 10gR2 jdbc clients are still supported with Oracle 12c. I have an application using an oracle10gr2 jdbc, and connection to 12c generates ORA-28040. Connection to 11gR2 works like a charm. O12.java import java.util.Properties; import java.sql.*; public class O12 { public static void main(String argv[]) throws SQLException { Properties […]

check jdbc version

There are 2 versions to check when using jdbc. The first one is in the name of the file : classes12.zip works with JDK 1.2 and later, ojdbc7.jar works with java7 and later. Even if classes12.zip works fine with JAVA 8, it is not supported. Be sure you check the support matrix on the Oracle […]

jdbc hello world

I am in a java mood today, let’s check how to print hello world with jdbc 🙂 import java.sql.*; public class HelloWorld { public static void main(String[] args) throws SQLException { DriverManager.registerDriver(new oracle.jdbc.OracleDriver()); ResultSet res = DriverManager. getConnection(“jdbc:oracle:thin:@srv1:1521:DB01”, “scott”, “tiger”). prepareCall(“select ‘Hello World’ txt from dual”). executeQuery(); res.next(); System.out.println(res.getString(“TXT”)); } } let’s compile javac -classpath […]