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 20130826-501a1632d983) VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15 OS: Linux User Comments: dkonecny: happen after "Finish"ing wizard "Entity from DB" GUEST: create entity classes wizard gives nullpointer exception in everyday usage Stacktrace: java.lang.NullPointerException at org.netbeans.modules.j2ee.persistence.wizard.library.PersistenceLibrarySupport.getLibrary(PersistenceLibrarySupport.java:288) at org.netbeans.modules.j2ee.persistence.wizard.Util.buildPersistenceUnitUsingData(Util.java:462) at org.netbeans.modules.j2ee.persistence.wizard.Util.buildPersistenceUnitUsingData(Util.java:432) at org.netbeans.modules.j2ee.persistence.wizard.fromdb.RelatedCMPWizard.instantiate(RelatedCMPWizard.java:276) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:605) at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:439)
Created attachment 139277 [details] stacktrace
do you have any persistence libraries registered and or server, project type, steps?
I cannot remember. The bug was random because running the same wizard second time passed without problems.
*** Bug 235060 has been marked as a duplicate of this bug. ***
Please use exception reporter or attach message.log. Latest build contain some logging to help to find out what may be the problem.
From two reports here and two from netcat, all 4 cases are for 64 bit environment, it may matter. But at least once it's random (on linux). I may need to find 64 bit windows installation.
Created attachment 139780 [details] stacktrace new j2se project, tried entity from db
ok, for me it's now always reproducible with j2se projects. if anybody have any other use case, please comment. there is a workaround - create persistence.xml first, but I suppose it's as a stopper for 7.4
#233726 regression. fix justification. before 233726 fix, if there was no provider supplier, default provider return nothing but later libraries providers was added, now need to move libraries providers into default supplier to get old behavior and fix 235059. the fix just restore old behavior but some code is located in another place now. http://hg.netbeans.org/web-main/rev/76b6a7d4c11e need qe verification. David, can you review the fix?
Add'l commenta per 74cat request: Anomaly is consistently reproducible with OEL 6.2 (64-bit) and Windows 7 (32-Bit) When adding "Entity Class from Database" (using MySQL Driver) to Java or JavaFX project. Product Version: NetBeans IDE Dev (Build 201309060001) Java: 1.7.0_40; Java HotSpot(TM) Client VM 24.0-b55 Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b40 System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Integrated into 'main-silver', will be available in build *201309080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/76b6a7d4c11e User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #235059 return providers in default supplier
> David, can you review the fix? The patch looks safe and can go. It might have been simpler perhaps by using a HashSet<Provider> to check for duplicates (considering you are using equals)? If PersistenceLibrarySupport.getProvidersFromLibraries() should ever return duplicate objects which are NOT instanceof Provider then these duplicates would be added to model array but that's a purely fictional problem I think.
Agree, it can be simpler, the main idea was just to restore 7.3 code, without much modification, it may be safer for now in my opinion as this code was here(or near here) for a number of previous releases.
(In reply to Quality Engineering from comment #11) > Integrated into 'main-silver', will be available in build *201309080001* on > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) > > Changeset: http://hg.netbeans.org/main-silver/rev/76b6a7d4c11e > User: Sergey B. Petrov <sj-nb@netbeans.org> > Log: #235059 return providers in default supplier verified by QE
http://hg.netbeans.org/releases/rev/3f3acf8ba905