p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
span.s1 { }
一、问题表象:
java.sql.SQLException: Io 异常: Got minus one from a read call
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at sms.SMSDatabase.getConnection(SMSDatabase.java:27)
at sms.SMSDatabase.remedy(SMSDatabase.java:158)
at sms.ProcessMessages.processSms(ProcessMessages.java:24)
at sms.ProcessSMSThread.run(ProcessSMSThread.java:27)
at java.lang.Thread.run(Unknown Source)
直接翻译就是从某个读操作返回了-1,即上一秒可能还正常,下一秒就不正常了
二、修改方案
1、数据库连接满了,扩大数据库连接池
2、所登录的机子IP不在sqlnet.ora内,加入后重启listerner即可
3、数据库负载均衡时,指定了(SERVER=DEDICATED),去除这个即可
4、网管在Oracle配置上限制了该台机子访问Oracle的权限,这个问题基本和2类似,也是修改Oracle配置即可
备注说明:
有的时候网络的波动也会产生此类问题
摘抄自:https://blog.csdn.net/cdguogang/article/details/18791213
原文地址:https://www.cnblogs.com/chendeming/p/9155797.html