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

Summary: ClassCastException XMLDataObject from PersistenceUtils$EntityMappingsCache.getPUDataObject
Product: javaee Reporter: Nam Nguyen <nnguyen>
Component: PersistenceAssignee: Erno Mononen <emononen>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: pjiricka
Priority: P1    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: log

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 ***