While trying to connect to db2, using ojdbc8, I am getting an error:
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1 ORA-01882: timezone region not found
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:456) at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:451) at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1040) at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:552) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268) at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:501) at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1292) at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1025) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743) at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at com.Learnjdbc.Connect.getConnection(Connect.java:33)
As per the line in logs, I am getting error on below line
conn = DriverManager.getConnection(URL,username,password);
Code snippet:
try {
Class.forName(className);
conn = DriverManager.getConnection(URL,username,password);
} catch (SQLException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
There is one way mentioned in ORA-01882: timezone region not found but this talks about changes in JAR, while I am using maven repo to get packages.