Intermittent JDBC "IO ERROR: UNEXPECTED PACKET" When LOB Stored as SECUREFILE

(Doc ID 1301936.1)

Last updated on SEPTEMBER 15, 2017

Applies to:

JDBC - Version 11.2.0.1.0 to 11.2.0.2.0 [Release 11.2]
Information in this document applies to any platform.

Symptoms

JDBC thin driver is being used to fetch LOBs stored as SECUREFILE. 

Intermittently the following exception is raised:
oracle.net.ns.NetException: Unexpected packet

For example:
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)
...
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)
... 42 more
Caused by: oracle.net.ns.NetException: Unexpected packet
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:252)
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:122)
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)
... 44 more

Changes

JDBC driver upgrade
or
LOB is now stored as SECUREFILE

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms