【发布时间】:2016-01-07 11:22:41
【问题描述】:
Centos7 和用于 Oracle 连接的 ojdbc6 驱动程序似乎存在问题。连接挂起和/或失败导致超时。以下是我可以推导出来显示这个问题的最简单的程序:
import java.sql.*;
public class Test{
public static void main(String[] args){
try{
Class.forName("oracle.jdbc.OracleDriver"):
}catch(ClassNotFoundException e){System.out.println(e);}
Connection conn = null;
try{
conn = DriverManager.getConnection(...);
}catch(SQLException e){System.out.println(e);}
}
}
奇怪的是这段代码在 Centos6 上执行得非常好。
【问题讨论】:
-
@Mureinik 这是一个超时问题