报错:’oracle.jdbc.driver.OracleTypes’ is not public in ‘oracle.jdbc.driver’. Cannot be accessed from outside package
错误提示: ‘oracle.jdbc.driver.OracleTypes’ is not public in ‘oracle.jdbc.driver’. Cannot be accessed from outside package 原因: 这是因为项目用到的oracle jdbc的jar包太老了,在ojdbc14.jar中,OracleTypes类是public的,而到了oracle 11g的驱动中,比如ojdbc5.jar ,ojdbc6.jar中,这个类源码如下: class OracleTypes extends oracle.jdbc.internal.OracleTypes { private static final String _Copyright_2007_Oracle_All_Rights_Reserved_ = null;…