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.
Build: NetBeans IDE Dev (Build 200807040101) VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14 OS: Windows 2000, 5.0, x86 User Comments: Creating entities from DB
Created attachment 64389 [details] stacktrace
Build: NetBeans IDE Dev (Build 080710) VM: Java HotSpot(TM) Client VM, 1.5.0_13-119, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_13-b05-237 OS: Mac OS X, 10.5.4, i386 User Comments: generating entity classes from database
Created attachment 64548 [details] stacktrace
Honza, can you provide me a reproducible case? What database did you use? I can not reproduce it with the sample, travel and another consult database from Matt.
*** Issue 139805 has been marked as a duplicate of this issue. ***
Mark it as "WORKSFORME" since I can not reproduce it.
See exceptions report for steps to reproduce. Should probably be a P2 since NPE occurred
this issue has 15 duplicates
apparently this bug was also in 6.1
more clear steps to reproduce: 1) Create new Web application with JavaServer Faces framework 2) Select project, right-click and choose Entity Classes from Database 3) Select jdbc/sample datasource then click the Add all button after classes generated 4) Click Next 5) Enter a package name, src 6) Click Next 7) Click Finish result is the NPE
John, I can not reproduce with your step in both 6.1 and 6.5. You need to show me.
I tried to reproduce on my Mac but could not this time (using the same build and scenario) Seems to be a threading problem
When I was debugging another bug, I found a reproducible case for this one using the travel database: - Generate Entity Classes from Database for table person only in package "person" - Generate Entity Classes from Database again for the rest of the tables in a different package "travel" (note: the bug happens only if a different package is used). NPE happens when click Finish. It is not a threading issue. It is truely a bug in the code. The current code assumes that all the entity classes are in the same package. When trying to generate relationship in the second step, it could not find "travel.Person". The workaround is to generate all the entity classes in the same package. If you need some of the entity classes in a different package, then do a refactoring afterwards.
Now that I have a reproducible case, this should be fixed in 6.5. The really bad part of this bug is after the NPE, it leaves invalid (empty) entity classes behind.
Fixed in changeset f0ee0cf3c6b2
verified. NetBeans IDE Dev (Build 200812080201)