When querying Oracle via JDBC, if a table that is being queried contains Long or Long Raw data,
the following error message may be thrown:
java.sql.SQLException: Stream has already been closed
This error occurs when trying to access a column other than the Long or Long Raw column before reading and closing the stream that the Oracle JDBC driver creates for the Long or Long Raw column data.
Oracle recommends not using Long and Long Raw columns. They are included in Oracle only for legacy reasons. However, if you do need to use Long or Long Raw columns, you should first handle the Long or Long Raw data before trying to access any other columns in the JDBC result set. This can be done using the getBinaryStream or getAsciiStream methods on the ResultSet object using the column index of the Long or Long Raw column. Make sure to read the entire stream and then close it.
RazorSQL does attempt to handle Long data correctly. However, there are situations where RazorSQL cannot read the Long or Long Raw data. In this case, RazorSQL will display a special value in the query results such as |LONG_DATA|.