英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论