java.sql.SQLRecoverableException: 无法从套接字中读取更多数据,从NoSQL读取

huangapple go评论67阅读模式
英文:

java.sql.SQLRecoverableException: No more data to read from socket reading from NoSQL

问题

我正在尝试从NoSQL读取数据,并将数据插入到Oracle中。如果我截断Oracle表然后尝试插入,它能够正常工作。如果已经存在数据,或者如果在读/写操作中间停止,然后再次从头开始尝试,我会得到以下相同的错误。

xx-xx-xx xx:xx:xx 严重 AnalyticsMigrate 主要 异常 java.sql.SQLRecoverableException:从套接字中没有更多数据可读
java.sql.SQLRecoverableException:从套接字中没有更多数据可读
	at oracle.jdbc.driver.T4CMAREngineNIO.prepareForReading(T4CMAREngineNIO.java:119)
	at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:534)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:485)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
英文:

I am trying to read data from NoSQL and inserting data in to oracle. If i truncate oracle table and try to insert, it works fine. I am getting this below error if already data exists or if i stop in middle of read/write operation and try again from the beginning i am getting the same error.

xx-xx-xx xx:xx:xx SEVERE AnalyticsMigrate main Exceptionjava.sql.SQLRecoverableException: No more data to read from socket
java.sql.SQLRecoverableException: No more data to read from socket
	at oracle.jdbc.driver.T4CMAREngineNIO.prepareForReading(T4CMAREngineNIO.java:119)
	at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:534)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:485)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)

答案1

得分: 1

JDBC 12.2 及更高版本在阻塞模式下使用 Java NIO 调用 - 当应用程序进行中断时。之前的 JDBC 版本使用基于流的 I/O API 调用,不受中断影响。

请尝试在连接之前使用以下代码:

System.setProperty("oracle.jdbc.javaNetNio", "false");

然后重试连接。

英文:

JDBC 12.2 and higher uses Java NIO Calls in blocking mode - when there are interrupts done by application. Previous JDBC releases uses stream-based I/O API calls which not affected by interrupts.

Please try to use

System.setProperty("oracle.jdbc.javaNetNio", "false");

before connecting and retry

huangapple
  • 本文由 发表于 2020年10月8日 21:28:05
  • 转载请务必保留本文链接:https://go.coder-hub.com/64263554.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定