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.
Summary: | NullPointerException at org.netbeans.modules.db.dataview.util.DBReadWriteHelper.readResultSet | ||
---|---|---|---|
Product: | db | Reporter: | Exceptions Reporter <exceptions_reporter> |
Component: | Show Data | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | cloeffler, schkovich |
Priority: | P3 | Keywords: | NETFIX |
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 190525 |
Attachments: | stacktrace |
Description
Exceptions Reporter
2012-07-08 19:47:35 UTC
Created attachment 121808 [details]
stacktrace
Ah - you would think implementing the jdbc specification is not that complex. From the stacktrace the problem arises from: byte[] bdata = rs.getBytes(index); the stacktrace indicates, that bdata is null after this call. After this call the further process is guarded by a call to rs.wasNull() - which had to return false to reach the reported line. This case is partly fixed in the upcoming 7.2 version, in which the whole blob/varbinary handling was reworked. The only missing part is a guard for the Types.BIT case. For the committers: Please add a guard in DBReadWriteHelper.java in line 192. There the call to rs.wasNull() is done, I would add a guard for a null result: if (rs.wasNull() || bdata == null) { (In reply to comment #2) > For the committers: > > Please add a guard in DBReadWriteHelper.java in line 192. There the call to > rs.wasNull() is done, I would add a guard for a null result: > > if (rs.wasNull() || bdata == null) { Fixed in http://hg.netbeans.org/core-main/rev/271f799ec3db Thank you, Matthias. Integrated into 'main-golden', will be available in build *201207110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/271f799ec3db User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #215255: NPE at DBReadWriteHelper.readResultSet |