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 […]

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 […]