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 142921 - NullPointerException at org.netbeans.modules.db.explorer.DatabaseConnection.connectSync
Summary: NullPointerException at org.netbeans.modules.db.explorer.DatabaseConnection.c...
Status: RESOLVED DUPLICATE of bug 142648
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Vancouvering
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-05 13:55 UTC by Andrei Badea
Modified: 2008-08-15 20:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 86651


Attachments
stacktrace (949 bytes, text/plain)
2008-08-05 13:55 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2008-08-05 13:55:16 UTC
Build: NetBeans IDE Dev (Build 080804)
VM: Java HotSpot(TM) Client VM, 1.5.0_11-ea-b01, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_11-ea-b01
OS: Linux, 2.6.25-2-686-bigmem, i386

User Comments: 
Testing usage of ConnectionManager.connect() in the SQL code completion.

Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.db.explorer.DatabaseConnection.connectSync(DatabaseConnection.java:509)
        at org.netbeans.api.db.explorer.ConnectionManager.connect(ConnectionManager.java:178)
        at org.netbeans.modules.db.metadata.model.DBConnMetadataModel.enterReadAccess(DBConnMetadataModel.java:132)
        at org.netbeans.modules.db.metadata.model.DBConnMetadataModel.runReadAction(DBConnMetadataModel.java:91)
        at org.netbeans.modules.db.metadata.model.api.MetadataModel.runReadAction(MetadataModel.java:63)
        at org.netbeans.modules.db.sql.editor.completion.SQLCompletionQuery.query(SQLCompletionQuery.java:102)
Comment 1 Andrei Badea 2008-08-05 13:55:20 UTC
Created attachment 66594 [details]
stacktrace
Comment 2 Quality Engineering 2008-08-09 03:43:11 UTC
Integrated into 'main-golden', available in build *200808090201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/71ed4c29341f
User: David Van Couvering <davidvc@netbeans.org>
Log: #142921 - NullPointerExceptions in connectSync()
Caused by trying to close a connection when none was available, which can happen if the attempt to connect failed
(transplanted from 080e1a5bb3b09547fe977d6367b150d30754cd5c)
(transplanted from a3aac36336f63be4d14cf11f0f02b9bda37b408e)
Comment 3 David Vancouvering 2008-08-15 20:38:34 UTC
This should be fixed now

*** This issue has been marked as a duplicate of 142648 ***