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 while capturing a dbschema file | ||
---|---|---|---|
Product: | db | Reporter: | Andrei Badea <abadea> |
Component: | DB schema | Assignee: | Andrei Badea <abadea> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | pjiricka |
Priority: | P1 | Keywords: | REGRESSION |
Version: | 6.x | ||
Hardware: | All | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Stack trace
Fix |
Description
Andrei Badea
2007-11-06 14:33:07 UTC
Created attachment 52602 [details]
Stack trace
Caused by the fix of issue 105724. Fixed. Checking in TableElementImpl.java; /cvs/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java,v <-- TableElementImpl.java new revision: 1.8; previous revision: 1.7 done This issue caused a larger regression, described at http://www.netbeans.org/servlets/ReadMsg?list=nbj2ee&msgNo=7214 Would be good to fix this for 6.0. Created attachment 52660 [details]
Fix
The issue was caused by dereferencing a reference which could have been null. The fix is trivial: check for null before dereferencing. QE, please test the Entity Classes from DB and Capture Schema (File > New File > Persistence > Database Schema) wizards on Oracle for regressions. You can't verify if the problem described by the reporter on nbj2ee, because I couldn't reproduce it. The reporter confirmed by private e-mail that the fix solved the problem. I will ask him to confirm again here. Reviewed, this looks good, and a very simple fix. Confirm that the issue is fixed. I tested against an Oracle Enterprise db with >450 tables in the schema. All tables (except those without a primary key) showed up as available in the Available Tables column of the generate Entity wizard, and table generation was successful. tested in the build 200711080000, looks like there are no regressions Fixed in release60. Checking in db/model/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java; /cvs/db/model/src/org/netbeans/modules/dbschema/jdbcimpl/TableElementImpl.java,v <-- TableElementImpl.java new revision: 1.7.4.1; previous revision: 1.7 done |