概述
这样写连不通:conn=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","zhou5Hmyp2");会报这种错误:Exceptioninthread"main"java.sql.SQLRecoverable...
这样写连不通:
conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","zhou5Hmyp2");
会报这种错误:
Exception in thread "main" java.sql.SQLRecoverableException: IO 错误: Socket read timed out
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:715)
at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:385)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at bao.DBUtil.getConnection(DBUtil.java:13)
at bao.DBUtil.main(DBUtil.java:30)
Caused by: oracle.net.ns.NetException: Socket read timed out
at oracle.net.ns.Packet.receive(Packet.java:350)
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:153)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:263)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
... 8 more
展开
最后
以上就是传统小天鹅为你收集整理的java连接本地oracle数据库_用jdbc怎么连到oracle的连接类型为“本地/继承”的数据库...的全部内容,希望文章能够帮你解决java连接本地oracle数据库_用jdbc怎么连到oracle的连接类型为“本地/继承”的数据库...所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复