My Oracle Support Banner

java.sql.SQLException: Stream has already been closed When Running Query In JDBC (Doc ID 832903.1)

Last updated on JUNE 23, 2021

Applies to:

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

Symptoms

An application using JDBC to connect to an Oracle database to generate ad hoc reports fails with error:

java.sql.SQLException: Stream has already been closed



The same query runs fine through SQLDeveloper.

This only appears to happen when the query includes a column with a type of Long.

For example, standalone program JDBCAssignment.java.:



Changes

 

Cause

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
Symptoms
Changes
Cause
Solution

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