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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 03:20:42  来源:igfitidea点击:

JDBC Oracle error: java.sql.SQLException: ORA-12592: TNS:bad packet

javaoraclejdbcoracle11g

提问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:

根本原因:

回答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 fileat BOTH the origin (or client)and at the Database server / instance:

将此参数添加到sqlnet.ora fileBOTHorigin (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