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 201105110000) VM: Java HotSpot(TM) 64-Bit Server VM, 19.1-b02-334, Java(TM) SE Runtime Environment, 1.6.0_24-b07-334-9M3326 OS: Mac OS X User Comments: kganfield: I got exception when trying to open the Hibernate Mapping Files and POJOs from Database wizard on a web application Stacktrace: java.lang.IllegalArgumentException: Called DataObject.find on null at org.openide.loaders.DataObject.find(DataObject.java:495) at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.isValid(HibernateCodeGenWizardDescriptor.java:125) at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:917) at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:861) at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:734) at org.netbeans.modules.project.ui.NewFileWizard.updateState(NewFileWizard.java:122)
Created attachment 108233 [details] stacktrace
Just to provide more information. I tried to open the Hibernate wizards on a project that was not created with the Hibernate framework in the New Project wizard so the project did not have the hibernate config file or any Hibernate libraries.
Created attachment 108381 [details] stacktrace I tried to generate the pojos and xml files for hibernate within a maven web project
a bootcamp (http://www.meetup.com/sv-web-jug/events/17462408/) attendee ran into this while experimenting with the hibernate features in NB 7.0. He had tried to use the Hibernate->Hibernate Mapping Files and POJOs from Database wizard. The first time he tried it, he had not added Hibernate to project as a Framework. He also hit the same exception after he added the Hibernate framework to the project. (I also noticed that this wizard does not have a special icon in the 'New File...' dialog, but that is pretty minor.)
Created attachment 111276 [details] stacktrace Hibernate mapping files and POJO from database in the projects wizard
Created attachment 111277 [details] stacktrace tried to invoke hibernate mapping files and pojo from database on a project without any hibernate configuration (but with persistence if it have sense)
Created attachment 111584 [details] stacktrace To reproduce: - create web application with GlassFish server - open new file wizard - choose "Hibernate|Hibernate Mapping Files and POJOs from Database" and exception is thrown
Created attachment 111994 [details] stacktrace Right-click on project, New Hibernate Mapping Files and POJO from database. Wizard opens, but this exception window is shown in the background
http://hg.netbeans.org/web-main/rev/1904017cfdd3 fix
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/1904017cfdd3 User: Sergey B. Petrov <sj-nb@netbeans.org> Log: #198524 correct validation order