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 97308 - ClassCastException XMLDataObject from PersistenceUtils$EntityMappingsCache.getPUDataObject
Summary: ClassCastException XMLDataObject from PersistenceUtils$EntityMappingsCache.ge...
Status: RESOLVED DUPLICATE of bug 90305
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 18:13 UTC by Nam Nguyen
Modified: 2007-03-07 09:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log (61.72 KB, text/plain)
2007-03-06 18:14 UTC, Nam Nguyen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Nguyen 2007-03-06 18:13:40 UTC
I am using NB IDE 5.5.1 build 200703050600.
Steps:

- Create Blue Prints Persistence Web-only sample.
- Set target server to Sun App Server
- Right click on package ...autoid.model and do new Entity Classes from database.

Will get exception dialog with:
java.lang.ClassCastException: org.netbeans.modules.xml.core.XMLDataObject cannot
be cast to org.netbeans.modules.j2ee.persistence.unit.PUDataObject
	at
org.netbeans.modules.j2ee.persistence.dd.PersistenceUtils$EntityMappingsCache.getPUDataObject(PersistenceUtils.java:651)
Comment 1 Nam Nguyen 2007-03-06 18:14:56 UTC
Created attachment 39222 [details]
log
Comment 2 Erno Mononen 2007-03-07 09:46:00 UTC
This is caused by an invalid persistence.xml file in the sample. The error 
handling has been already improved in trunk, please see issue 90305 for a 
workaround and for more details on this. The problem has been filed against 
blueprints as well (issue 90376).

*** This issue has been marked as a duplicate of 90305 ***