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 206835 - NullPointerException at org.netbeans.lib.ddl.adaptors.DefaultAdaptor.getDatabaseProductName
Summary: NullPointerException at org.netbeans.lib.ddl.adaptors.DefaultAdaptor.getDatab...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords: NETFIX
: 213602 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-02 10:15 UTC by xylifyx
Modified: 2013-01-29 03:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 180554


Attachments
stacktrace (579 bytes, text/plain)
2012-01-02 10:15 UTC, xylifyx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xylifyx 2012-01-02 10:15:54 UTC
Build: NetBeans IDE 7.1 Beta (Build 201109252201)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02-384, Java(TM) SE Runtime Environment, 1.6.0_26-b03-384-10M3425
OS: Mac OS X

Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.lib.ddl.adaptors.DefaultAdaptor.getDatabaseProductName(DefaultAdaptor.java:505)
   at org.netbeans.modules.db.explorer.node.ConnectionNode.updateLocalProperties(ConnectionNode.java:176)
   at org.netbeans.modules.db.explorer.node.ConnectionNode.access$200(ConnectionNode.java:74)
   at org.netbeans.modules.db.explorer.node.ConnectionNode$2.run(ConnectionNode.java:316)
   at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
   at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1973)
Comment 1 xylifyx 2012-01-02 10:15:56 UTC
Created attachment 114548 [details]
stacktrace
Comment 2 Jaroslav Havlin 2012-06-08 14:24:15 UTC
*** Bug 213602 has been marked as a duplicate of this bug. ***
Comment 3 matthias42 2013-01-13 18:46:32 UTC
This looks like a typical jdbc driver problem - returning NULL as productname seems not to be sensible - whatever...

If the start of line 505 is changed from

            if (dmd != null) product = dmd.getDatabaseProductName().trim();

to

            if (dmd != null && dmd.getDatabaseProductName() != null) product = dmd.getDatabaseProductName().trim();

this bug can be closed. I don't see how else a NULL Pointer Exception could be created.
Comment 4 Jaroslav Havlin 2013-01-28 16:12:49 UTC
http://hg.netbeans.org/core-main/rev/00eb8db06c53
Fixed. Thank you, Matthias!
Comment 5 Quality Engineering 2013-01-29 03:28:06 UTC
Integrated into 'main-golden', will be available in build *201301290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/00eb8db06c53
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #206835: NPE at o.n.lib.ddl.adaptors.DefaultAdaptor.getDatabaseProductName