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 269153 - NullPointerException at org.postgresql.jdbc.PgResultSetMetaData.getBaseTableName
Summary: NullPointerException at org.postgresql.jdbc.PgResultSetMetaData.getBaseTableName
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-29 06:21 UTC by stefan79
Modified: 2017-01-12 04:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 227357


Attachments
stacktrace (877 bytes, text/plain)
2016-11-29 06:21 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2016-11-29 06:21:22 UTC
Build: NetBeans IDE 8.2 (Build 201609300101)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.102-b14, Java(TM) SE Runtime Environment, 1.8.0_102-b14
OS: Windows 8.1

User Comments:
stefan79: Exception occured after executing a count(*)-Statement at a posgresql-DB.




Stacktrace: 
java.lang.NullPointerException
   at org.postgresql.jdbc.PgResultSetMetaData.getBaseTableName(PgResultSetMetaData.java:358)
   at org.postgresql.jdbc.PgResultSetMetaData.getTableName(PgResultSetMetaData.java:352)
   at org.netbeans.modules.db.dataview.meta.DBMetaDataFactory.generateDBTables(DBMetaDataFactory.java:192)
   at org.netbeans.modules.db.dataview.output.SQLExecutionHelper$1Loader.run(SQLExecutionHelper.java:166)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
Comment 1 stefan79 2016-11-29 06:21:25 UTC
Created attachment 163066 [details]
stacktrace
Comment 2 stefan79 2016-11-29 08:46:35 UTC
Select was wrong.

Wrong:
SELECT issues, count(*) anzahl

Correct:
SELECT issues.rule_id, count(*) anzahl

A better errormessage would be nice.
Comment 3 matthias42 2016-12-03 14:28:50 UTC
The fix that is pushed as:

http://hg.netbeans.org/core-main/rev/88fc3c35211f

results in suppressing the warnings popup and instead reporting the
present information to the user in the sql log window.

This is not the resolution you'd like to see, but the
SQL driver raises an NullPointerException on a pretty basic
operation (querying the table name). I'd suggest to raise this
with the postgresql jdbc developers.
Comment 4 Quality Engineering 2017-01-12 04:02:12 UTC
Integrated into 'main-silver', will be available in build *201701120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/88fc3c35211f
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #269153: Report exceptions while quering in sql log window instead of the "warnings" dialog

The enduser sees the exception class and message, while in the log the full stack trace
can be found if needed.