My Oracle Support Banner

Auto-Generated WLS Entity Bean Code Fails With "Stream Has Already Closed" When Using LONG RAW (Doc ID 1293822.1)

Last updated on NOVEMBER 16, 2021

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


A EJB-CMP based JDBC application intermittently throws the following exception when accessing LONG RAW columns in the database:

getConnection returning driver[className=weblogic.jdbc.jts.Driver,weblogic.jdbc.jts.Driver<Object ID>]
SQLException: SQLState(null) vendor code(17027)
java.sql.SQLException: Stream has already been closed
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.LongRawAccessor.getBytes(
at oracle.jdbc.driver.OracleResultSetImpl.getBytes(
at weblogic.jdbc.wrapper.ResultSet.getBytes(
at weblogic.ejb20.internal.MDListener.execute(
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(
at weblogic.ejb20.internal.MDListener.onMessage(
at weblogic.jms.client.JMSSession.onMessage(
at weblogic.jms.client.JMSSession.execute(
at weblogic.kernel.ExecuteThread.execute(


The database and JDBC driver were recently upgraded from 9iR2 to


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.