0 Replies Latest reply: Jan 8, 2015 1:22 PM by 958791 RSS

    JDBC java.io.IOException: IO Error: Unexpected packet error reading BLOB

    958791

      Oracle JDBC driver threw exception _"java.io.IOException: IO Error: Unexpected packet"_ - while reading data from a BLOB column.
      Any help in resolution please?
      Database Version: Oracle Database 11g Enterprise Edition Release _11.2.0.2.0_ - 64bit Production.
      Database configuration: This is a single-server, non-RAC Oracle 11g, With the Partitioning, OLAP, Data Mining, Real Application Testing options and High compression.
      JDBC driver: ojdbc6.jar with manifest information as below:
      Manifest-Version: 1.0
      Ant-Version: Apache Ant 1.6.5
      Created-By: 1.5.0_17-b02 (Sun Microsystems Inc.)
      Implementation-Vendor: Oracle Corporation
      Implementation-Title: JDBC
      Implementation-Version: _11.2.0.1.0_
      Specification-Vendor: Sun Microsystems Inc.
      Specification-Title: JDBC
      Specification-Version: 4.0
      Main-Class: oracle.jdbc.OracleDriver

      Here is the complete stack trace (excluding my custom exception handler):
      Caused by: java.io.IOException: IO Error: Unexpected packet
      at oracle.jdbc.driver.OracleBlobInputStream.needBytes
      (OracleBlobInputStream.java:204)
      at oracle.jdbc.driver.OracleBufferedStream.readInternal
      (OracleBufferedStream.java:169)
      at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.
      java:143)
      at oracle.jdbc.driver.OracleBufferedStream.read(OracleBufferedStream.
      java:132)
      ... 91 more
      Caused by: java.sql.SQLRecoverableException: IO Error: Unexpected packet
      at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2325)
      at oracle.sql.BLOB.getBytes(BLOB.java:319)
      at oracle.jdbc.driver.OracleBlobInputStream.needBytes
      (OracleBlobInputStream.java:181)
      ... 100 more
      Caused by: oracle.net.ns.NetException: Unexpected packet
      at oracle.net.ns.NetException.(NetException.java:183)
      at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:222)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
      at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
      at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket
      (T4CSocketInputStreamWrapper.java:118)
      at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read
      (T4CSocketInputStreamWrapper.java:78)
      at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
      at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8TTILob.read(T4C8TTILob.java:146)
      at oracle.jdbc.driver.T4CConnection.getBytes(T4CConnection.java:2313)
      ... 102 more
      .