SQLException:违反协议。 Oracle JDBC驱动程序问题 [英] SQLException: Protocol violation. Oracle JDBC Driver issue

查看:1409
本文介绍了SQLException:违反协议。 Oracle JDBC驱动程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  java.sql.SQLException:在oracle上违反
的协议。 jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)
at oracle.jdbc.driver.DatabaseError.throwSqlException( DatabaseError.java:286)
at oracle.jdbc.driver.T4C80all.receive(T4C80all.java:766)
at oracle.jdbc.driver.T4CPreparedStatement.do0all8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1225)
at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:373)
at oracle.jdbc.driver .OracleResultSetImpl.next(OracleResultSetImpl.java:284)

Oracle系统正在运行10.2.0.3.0在Solaris 5.10上。 jdbc驱动程序在JDK 1.6.0_21上运行(如果是导入,Java也运行在Solaris 5.10机器上)。我已经尝试了几种不同的oracle瘦驱动程序,包括最新版本和与oracle版本完全匹配的驱动。



我正在运行的查询相当简单: select * from some_table order by key1,key2,key3然后迭代结果集并写入文件。该表有大约1200万行,所以我期望这个过程运行很久,但似乎在5-15分钟内死亡。每次我运行它,它会在另一行上吹,所以我不认为问题是与数据。



我发现了oracle警报日志,但我不知道那里的任何事情与我的过程有关。不过,我不是oracle专家,也许有一个oracle设置我需要看。奇怪的是,我在不同的连接上运行了大约五种这样的查询类型(一对有点复杂),只有两个最简单的查询出现这个问题。



任何关于如何缩小问题的帮助或想法将不胜感激。

解决方案

显然添加-d64到java命令行修复了这个问题。看起来像一个Solaris 64位问题。


I'm getting the following excpetion:

java.sql.SQLException: Protocol violation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)
at oracle.jdbc.driver.T4C80all.receive(T4C80all.java:766)
at oracle.jdbc.driver.T4CPreparedStatement.do0all8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.fetch(T4CPreparedStatement.java:1225)
at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:373)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:284)

The Oracle system is running 10.2.0.3.0 on Solaris 5.10. The jdbc driver is running on JDK 1.6.0_21 (if it's import the java is running on a Solaris 5.10 machine as well). I've tried several different oracle thin drivers including the latest and the one that appears to exactly match the oracle version.

The query I'm running is fairly simple: "select * from some_table order by key1, key2, key3" Then iterating through the result set and writing to a file. The table has around 12 million rows, so I expect the process is running long, but it seems to die within 5-15 mins into it. Each time I run it, it blows up on a different row, so I don't think the problem is with the data.

I found the oracle alert log but I couldn't tell that anything in there was related to my process. Still, I'm no oracle expert and perhaps there's an oracle setting I need to look at. Strangely enough, I'm running about five of these type of queries (a couple are a bit more complicated) on different connections and only two simplest ones ever get this problem.

Any help or ideas on what to look at to narrow down the problem would be appreciated.

解决方案

Apparently adding -d64 to the java command line fixes this problem. Looks like a Solaris 64-bit issue.

这篇关于SQLException:违反协议。 Oracle JDBC驱动程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆