S
sadj
Unregistered / Unconfirmed
GUEST, unregistred user!
我在运行一段使用sql语句访问oracle9.2的java程序的时候,遇到了如下的异常:
java.sql.SQLException: 无法从套接字读取更多的数据
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:369)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)
这句话的形式是这样的:
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=20
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=10
这段sql语句在sqlplus中执行是正确的,并且如果我缩小步长,比如改为
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=20
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=16
它也可以在java中得到正确的执行,如果扩大,比如扩大成
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=30
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=10
就又不能正确执行了(报上述异常),但是
对于
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=40 --(或者50或者其他)
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=30
java又可以正确执行,似乎是10-30之间有某些数据造成了上述错误,但是我设定步长为5,然后扫遍整个10-30区间,
又看不到上述异常,后来我把这张表的数据删除,然后重新导入,这个问题就不见了。
软件环境:
数据库 oracle9.2
jdk 1.3
class12是oracle9.2安装目录下的oracle/odbc/lib/class12.jar(换用其他的较为新的jar也是如此)
请教各位大老,如何解决这个问题?
十万火急!万分感谢!
java.sql.SQLException: 无法从套接字读取更多的数据
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:369)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:1198)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2400)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:572)
这句话的形式是这样的:
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=20
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=10
这段sql语句在sqlplus中执行是正确的,并且如果我缩小步长,比如改为
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=20
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=16
它也可以在java中得到正确的执行,如果扩大,比如扩大成
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=30
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=10
就又不能正确执行了(报上述异常),但是
对于
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=40 --(或者50或者其他)
minus
select * from (SELECT * FROM c_mplate WHERE 1=1 ) where rownum<=30
java又可以正确执行,似乎是10-30之间有某些数据造成了上述错误,但是我设定步长为5,然后扫遍整个10-30区间,
又看不到上述异常,后来我把这张表的数据删除,然后重新导入,这个问题就不见了。
软件环境:
数据库 oracle9.2
jdk 1.3
class12是oracle9.2安装目录下的oracle/odbc/lib/class12.jar(换用其他的较为新的jar也是如此)
请教各位大老,如何解决这个问题?
十万火急!万分感谢!