This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 219013

Summary: java.sql.SQLException: Stream has already been closed
Product: db Reporter: renato_marquez
Component: Show DataAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED WORKSFORME    
Severity: normal CC: lukeester, _m4c0_
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 192756
Attachments: stacktrace

Description renato_marquez 2012-09-25 18:05:46 UTC
This bug was originally marked as duplicate of bug 179959, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.2 (Build 201207171143)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7

User Comments:
_m4c0_: I have an Oracle connection. The DBMS was configured to kill the connection after a 5 minutes timeout. Steps:

1. Connect to database at Services TC
2. Right click on database, "Execute command"
3. Executed some random SQL
4. Wait until timeout
5. Tryed to run more SQL (the exception was thrown)
6. Right click on database, "Disconnect"
7. Repeated 2 and 3 (the exception was thrown again - that's the one I'm reporting)

lukeester: I excuted a very expensive SQL query
I canceled the query execution in netbeans by clicking the 'X' on its task in the bottom right corner
Netbeans locked up
I killed the netbeans.exe process
I started Netbeans back up
I executed an SQL query on a completely different connection to a different DB and that caused the exception

GUEST: Estava executando uma query simples, quando ocorreu o problema.

GUEST: Tried to run "select * from SYS.ALL_CONSTRAINTS" on an oracle database

GUEST: Clicking execute query on Oracle database.




Stacktrace: 
java.sql.SQLException: Stream has already been closed
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:190)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:286)
   at oracle.jdbc.driver.LongAccessor.getBytes(LongAccessor.java:212)
   at oracle.jdbc.driver.LongAccessor.getString(LongAccessor.java:281)
   at oracle.jdbc.driver.T4CLongAccessor.getString(T4CLongAccessor.java:422)
Comment 1 renato_marquez 2012-09-25 18:05:49 UTC
Created attachment 124902 [details]
stacktrace
Comment 2 Jaroslav Havlin 2012-09-26 14:47:20 UTC
Please, columns of what types were returned from the query?
Is the error thrown every time you execute the query, or was it thrown only once?
Wasn't the server really down, or connection broken or closed?
Thank you.
Comment 3 renato_marquez 2012-09-26 14:56:02 UTC
Hello jhavlin,

Truthfully, I do not remember the query submitted to the database.

The error was generated only once.

As I was connected to the server via a VPN, and this, in turn, is unstable, I think this must have been the reason for the exception.

Regards
Comment 4 Jaroslav Havlin 2012-09-26 15:14:33 UTC
Hello Renato,

thank you very much for such a quick answer!

I also think that this error was caused by broken connection.
However, if you encounter any problems that we can fix, let us know :-)

Kind regards.