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.

Bug 198524 - IllegalArgumentException: Called DataObject.find on null
Summary: IllegalArgumentException: Called DataObject.find on null
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Hibernate (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-11 16:53 UTC by Kenneth Ganfield
Modified: 2011-11-24 13:49 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 178161


Attachments
stacktrace (9.04 KB, text/plain)
2011-05-11 16:53 UTC, Kenneth Ganfield
Details
stacktrace (3.62 KB, text/plain)
2011-05-18 21:53 UTC, RedShadow
Details
stacktrace (4.52 KB, text/plain)
2011-09-28 12:34 UTC, sunbiz
Details
stacktrace (6.51 KB, text/plain)
2011-09-28 12:49 UTC, Sergey Petrov
Details
stacktrace (6.80 KB, text/plain)
2011-10-06 09:17 UTC, Jiri Skrivanek
Details
stacktrace (4.52 KB, text/plain)
2011-10-13 11:35 UTC, sunbiz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Ganfield 2011-05-11 16:53:01 UTC
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)
Comment 1 Kenneth Ganfield 2011-05-11 16:53:06 UTC
Created attachment 108233 [details]
stacktrace
Comment 2 Kenneth Ganfield 2011-05-11 16:58:38 UTC
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.
Comment 3 RedShadow 2011-05-18 21:53:29 UTC
Created attachment 108381 [details]
stacktrace

I tried to generate the pojos and xml files for hibernate within a maven web project
Comment 4 Vince Kraemer 2011-05-31 19:36:14 UTC
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.)
Comment 5 sunbiz 2011-09-28 12:34:34 UTC
Created attachment 111276 [details]
stacktrace

Hibernate mapping files and POJO from database in the projects wizard
Comment 6 Sergey Petrov 2011-09-28 12:49:34 UTC
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)
Comment 7 Jiri Skrivanek 2011-10-06 09:17:48 UTC
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
Comment 8 sunbiz 2011-10-13 11:35:37 UTC
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
Comment 9 Sergey Petrov 2011-10-31 14:09:16 UTC
http://hg.netbeans.org/web-main/rev/1904017cfdd3 fix
Comment 10 Quality Engineering 2011-11-01 15:11:13 UTC
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