【发布时间】:2014-10-15 08:19:28
【问题描述】:
这是我正在使用的代码(Oracle 数据库连接):
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@loclahost:1521:XE","system","system");
System.out.println("connection is established");
Statement stmt=conn.createStatement();
int i=stmt.executeUpdate("insert table students ( name varchar2(15),mobile number(10),age varchar2(1))");
System.out.println("Save Sucessfully");
stmt.close();
conn.close();
} catch(Exception e) {
System.out.println(e);
}
this.dispose();
出现以下错误:
java.sql.SQLRecoverableException:IO 错误:网络适配器可以 没有建立连接
【问题讨论】:
-
欢迎来到 StackOverflow。你能告诉我们你的堆栈跟踪吗?没有这个就很难确定你的具体问题。