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 172053 - org.netbeans.api.db.explorer.DatabaseException: connection error; Excepci�n de E/S: Connection reset
Summary: org.netbeans.api.db.explorer.DatabaseException: connection error; Excepci�n d...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-11 16:05 UTC by billy_joel
Modified: 2011-03-31 08:50 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 152237


Attachments
stacktrace (581 bytes, text/plain)
2009-09-11 16:05 UTC, billy_joel
Details
stacktrace (596 bytes, text/plain)
2009-10-05 20:33 UTC, emiddio
Details
stacktrace (583 bytes, text/plain)
2010-07-30 12:10 UTC, misterm
Details
stacktrace (556 bytes, text/plain)
2010-07-30 14:43 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description billy_joel 2009-09-11 16:05:23 UTC
Build: NetBeans IDE 6.7.1 (Build 200907230233)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.1, x86

User Comments:
setdosa: I connected to the oracle database using jdbc, looked at data in a couple of tables and disconnected

rptmaestro: Disconnected from oracle database connection after restoring network connection.

billy_joel: I was trying to close a Connection

jkak: Tryin to disconnect from a PROGRESS 9.1B database

jrechtacek: While disconnecting Orcl XE connection, problably a broken network.



Stacktrace: 
org.netbeans.api.db.explorer.DatabaseException: connection error; Excepci�n de E/S: Connection reset
        at org.netbeans.modules.db.explorer.DatabaseConnector.performDisconnect(DatabaseConnector.java:196)
        at org.netbeans.modules.db.explorer.DatabaseConnection.disconnect(DatabaseConnection.java:933)
        at org.netbeans.modules.db.explorer.action.DisconnectAction$1.run(DisconnectAction.java:97)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
Comment 1 billy_joel 2009-09-11 16:05:29 UTC
Created attachment 87510 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-09-11 16:05:33 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152237
Comment 3 emiddio 2009-10-05 20:33:18 UTC
Build: NetBeans IDE 6.7.1 (Build 200907230233)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
org.netbeans.api.db.explorer.DatabaseException: connection error; Connection failure. sendMethodRequestNoFlush(...).
        at org.netbeans.modules.db.explorer.DatabaseConnector.performDisconnect(DatabaseConnector.java:196)
        at org.netbeans.modules.db.explorer.DatabaseConnection.disconnect(DatabaseConnection.java:933)
        at org.netbeans.modules.db.explorer.action.DisconnectAction$1.run(DisconnectAction.java:97)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)
Comment 4 emiddio 2009-10-05 20:33:22 UTC
Created attachment 88867 [details]
stacktrace
Comment 5 Exceptions Reporter 2009-10-05 20:33:26 UTC
This issue already has 7 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152237
Comment 6 Exceptions Reporter 2009-12-19 12:25:33 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=152237
Comment 7 misterm 2010-07-30 12:10:30 UTC
Created attachment 101116 [details]
stacktrace
Comment 8 misterm 2010-07-30 14:43:31 UTC
Created attachment 101117 [details]
stacktrace
Comment 9 j.boesl 2011-03-25 13:29:59 UTC
I'm getting that exception in my NBPlatform-Application, too.
I think I was able to reproduce it.

The exception always occures with:

// CODE START

final org.netbeans.api.db.explorer.DatabaseConnection dbCon; // this is an initialized but not connected connection.
SwingUtilities.invokeAndWait(new Runnable()
{
  public void run()
  {
    ConnectionManager.getDefault().showConnectionDialog(dbCon);
  }
});
Connection jdbcConnection = dbConnection.getJDBCConnection();
// use the jdbcConnection for a select distinct statement.

// CODE END



When I close the NBPlatform-App the exception occures:

org.netbeans.api.db.explorer.DatabaseException: connection error; Eine Verbindung kann nicht beendet werden, solange noch eine Transaktion aktiv ist.
 at org.netbeans.modules.db.explorer.DatabaseConnector.performDisconnect(DatabaseConnector.java:186)
 at org.netbeans.modules.db.explorer.DatabaseConnection.disconnect(DatabaseConnection.java:1050)
 at org.netbeans.modules.db.DatabaseModule.close(DatabaseModule.java:67)
...


It seems uppon 'ConnectionManager.getDefault().showConnectionDialog(dbCon);' a SQL is processed which fetches some MetaData-Information and I mustn't use the 'Connection'-Object until this request finishs.

When I do a 'Thread.sleep(100)' before I use the 'Connection'-Object no Exception is thrown when the database is disconnected.
Comment 10 j.boesl 2011-03-25 13:32:11 UTC
Forgot to mention: 
NetBeans 6.9.1, Windows 7 64Bit, JDK 6u23 32Bit
Comment 11 Jiri Rechtacek 2011-03-25 13:42:34 UTC
j.boesl, thanks a lot for test-case. It can help me to fixing this problem.
Comment 12 Jiri Rechtacek 2011-03-30 11:40:34 UTC
Better handling this problem - core-main/rev/d9efe3328953

j.boesl, your test-case didn't reproduce it for me. If you problem persists, file new issue with more detail test-case, a sample module showing the problem will be best. Thanks
Comment 13 Quality Engineering 2011-03-31 08:50:34 UTC
Integrated into 'main-golden', will be available in build *201103310400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d9efe3328953
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #172053: DatabaseException: connection error; Excepci?n de E/S: Connection reset