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 20111026-ec2195fcddcc) VM: Java HotSpot(TM) Client VM, 20.2-b06, Java(TM) SE Runtime Environment, 1.6.0_27-b07 OS: Windows 7 User Comments: GUEST: Creating a new Hibernate Mapping Wizard sj-nb: hibarnate mapping wizard. in j2se create hibernate config on sample derby db connection create some class invoke hibernate mapping Stacktrace: java.lang.AssertionError at org.netbeans.modules.hibernate.wizards.support.DBSchemaManager.getSchemaElement(DBSchemaManager.java:96) at org.netbeans.modules.hibernate.util.HibernateUtil.getAllDatabaseTablesOnEventThread(HibernateUtil.java:180) at org.netbeans.modules.hibernate.service.spi.HibernateEnvironmentImpl.getAllDatabaseTablesOnEventThread(HibernateEnvironmentImpl.java:294) at org.netbeans.modules.hibernate.wizards.HibernateMappingWizardPanel.fillDatabaseTable(HibernateMappingWizardPanel.java:109) at org.netbeans.modules.hibernate.wizards.HibernateMappingWizardPanel.<init>(HibernateMappingWizardPanel.java:91) at org.netbeans.modules.hibernate.wizards.HibernateMappingWizardDescriptor.getComponent(HibernateMappingWizardDescriptor.java:77)
Created attachment 112497 [details] stacktrace
reproducible in case of "fast wizard access" i.e. New|Mapping.. isntead of New|Other
it's one more wizard broken after recent changes to wizards, it may have wrong code within but it was ok before but now cause problems.
Created attachment 112869 [details] stacktrace Creating hibernate mapping file for a maven project
Created attachment 112946 [details] stacktrace Creating hibernate mapping file with wizard Date ; 07 nov. 2011
*** Bug 204792 has been marked as a duplicate of this bug. ***
I'm working on it, unfortunatly fast fix with just move initialization into swingutilities.invokelater do not solve the problem, need some more time.
http://hg.netbeans.org/web-main/rev/b4c04e90ad57 fix similar to persistence wizrd fix
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/b4c04e90ad57 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #204327 postpone initialization, similar to 202022
Not sure what the original assertion was about, but one mistake in iterator code that could cause problems is creating the GUI component for a panel eagerly. This should only be done if and when getComponent is called by the wizard infrastructure, which will happen just if and when the panel is actually displayed.
Do you mean there is a problem with this fix or in initial logic? Initial assertion was cause by changes in a way wizard can be initialized, before 7.1 it was always in EDT, now it may be either in EDT or not. But If I got it right, I agree, there was strange order of panels initialization as second panel connect to db right after panel creation and this part of code was possible to invoke later (once panel is accessed), not sure if getComponent can be used, need to look at.
(In reply to comment #11) > Do you mean there is a problem with this fix or in initial logic? In initial logic, perhaps - I do not know anything specifically about this wizard, just a hint.