JDBC Oracle 错误:java.sql.SQLException:ORA-12592:TNS:坏包
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41019939/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JDBC Oracle error: java.sql.SQLException: ORA-12592: TNS:bad packet
提问by user5773508
I am getting below error while fetching record from ResultSet.Please could you help to resole this sissue.
从 ResultSet 获取记录时出现以下错误。请您帮忙解决这个问题。
java.sql.SQLException: ORA-12592: TNS:bad packet
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.ava:225)
at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1066)
at oracle.jdbc.driver.OracleStatement.fetchMoreRows(OracleStatement.java:3716)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.fetchMoreRows(InsensitiveScrollableResultSet.java:1015)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.absoluteInternal(InsensitiveScrollableResultSet.java:979)
at oracle.jdbc.driver.InsensitiveScrollableResultSet.next(InsensitiveScrollableResultSet.java:579)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
回答by coderpc
Root Cause:
根本原因:
Due to a defect or configuration issue in the operating environment.
May be a firewall was intermittently interrupting database requests on the network which led to this exception.
More help: http://www.tek-tips.com/viewthread.cfm?qid=1673903
由于操作环境中的缺陷或配置问题。
可能是防火墙间歇性地中断网络上的数据库请求导致此异常。
更多帮助:http: //www.tek-tips.com/viewthread.cfm?qid=1673903
回答by Utsav
The following workaround has been proven to resolve the issue (in most cases) until the patch can be applied, but with a warning and important note:
以下解决方法已被证明可以在应用补丁之前解决问题(在大多数情况下),但带有警告和重要说明:
Add this parameter to the sqlnet.ora file
at BOTH the origin (or client)
and at the Database server / instance
:
将此参数添加到sqlnet.ora file
BOTHorigin (or client)
和Database server / instance
:
SQLNET.SEND_TIMEOUT=n
SQLNET.SEND_TIMEOUT=n
- Where
n is a value in seconds
. The setting itself, and not the value, should resolve this issue, so a relatively high setting should eliminate this problem but with no impact to normal functions.
- 哪里
n is a value in seconds
。应该是设置本身而不是值来解决这个问题,所以相对较高的设置应该可以消除这个问题,但不会影响正常功能。
E.g.
SQLNET.SEND_TIMEOUT=60000
例如
SQLNET.SEND_TIMEOUT=60000