论坛首页 Java企业应用论坛

关于 java 连接oracle的 Io 异常: Got minus one from a read call

浏览 13960 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2012-08-31  
今日无意中用java连接oracle时,竟出现以下异常,甚是奇怪:
Caused by: java.sql.SQLException: Io 异常: Got minus one from a read call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
....

问题在重新启动应用后,应用连接oracle时出错,无法启动应用。

最后重新启动oracle11g的服务,没有问题了,但是还没有找到具体原因。




后来在另外一台应用上也发现同样问题,发现问题的严重性,经过分析可能是驱动问题;在不重新启动oracle11g服务的情况下,替换最新版本的jdbc驱动包,问题解决;


出问题的ojdbc14.jar版本:(查看jar包的MANIFEST.MF文件)
Manifest-Version: 1.0
Specification-Title:    Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_08 (Sun Microsystems Inc.)
Implementation-Title:   ojdbc14.jar
Specification-Vendor:   Oracle Corporation
Specification-Version:  Oracle JDBC Driver version - "10.2.0.1.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.1.0"
Implementation-Vendor:  Oracle Corporation
Implementation-Time:    Wed Jun 22 11:19:45 2005

Name: oracle/sql/converter/
Sealed: false

Name: oracle/sql/
Sealed: false

Name: oracle/sql/converter_xcharset/
Sealed: false


解决问题的ojdbc14.jar版本:
Manifest-Version: 1.0
Specification-Title:    Oracle JDBC driver classes for use with JDK14
Sealed: true
Created-By: 1.4.2_14 (Sun Microsystems Inc.)
Implementation-Title:   ojdbc14.jar
Specification-Vendor:   Oracle Corporation
Specification-Version:  Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Version: Oracle JDBC Driver version - "10.2.0.4.0"
Implementation-Vendor:  Oracle Corporation
Implementation-Time:    Sat Feb  2 11:40:29 2008

Name: oracle/sql/converter/
Sealed: false

Name: oracle/sql/
Sealed: false

Name: oracle/sql/converter_xcharset/
Sealed: false


论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics