当我调试时,代码停留在连接创建上,过一会儿抛出一个错误,表明时间已经过去了。
创建连接:
//Loading and registering Oracle database thin driver
Class.forName("oracle.jdbc.driver.OracleDriver");
//Creating a connection between Java program and Oracle database.
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@hostname:port/servicename","username","password");
错误:
java.sql.SQLRecoverableException:IO错误:远程主机强行关闭了现有连接,身份验证失效183633 ms。