Bug 298252 - Incorrect error when orm.xml references non-existent entity class
Summary: Incorrect error when orm.xml references non-existent entity class
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-19 11:12 EST by Doug Clarke CLA
Modified: 2022-06-09 10:07 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Clarke CLA 2009-12-19 11:12:24 EST
When my eclipselink-orm.xml file references an entity class which I refactored into another package I get:

	at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.initializeFromAgent(JavaSECMPInitializerAgent.java:45)
	at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializerAgent.premain(JavaSECMPInitializerAgent.java:38)
	... 6 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [project] failed.
Internal Exception: Exception [EclipseLink-7215] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Could not load the field named [id] on the class [class model.Project]. Ensure there is a corresponding field with that name defined on the class.
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:986)
	at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:88)
	at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:256)
	at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:216)
	at org.eclipse.persistence.internal.jpa.deployment.JavaSECMPInitializer.initializeFromAgent(JavaSECMPInitializer.java:159)
	... 12 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [project] failed.
Internal Exception: Exception [EclipseLink-7215] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Could not load the field named [id] on the class [class model.Project]. Ensure there is a corresponding field with that name defined on the class.
	at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
	... 17 more
Caused by: Exception [EclipseLink-7215] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Could not load the field named [id] on the class [class model.Project]. Ensure there is a corresponding field with that name defined on the class.
	at org.eclipse.persistence.exceptions.ValidationException.invalidFieldForClass(ValidationException.java:2562)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.ClassAccessor.addAccessors(ClassAccessor.java:284)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess(EntityAccessor.java:559)
	at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.preProcess(EntityAccessor.java:495)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage1(MetadataProject.java:1305)
	at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:460)
	at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:390)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:940)
	... 16 more
Exception in thread "main" FATAL ERROR in native method: processing of -javaagent failed


It should report that Project class cannot be found instead of not finding its id attribute.
Comment 1 Tom Ware CLA 2010-01-14 15:39:12 EST
Setting target and priority.  See
http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines for details of
what these values mean.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:05:58 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:07:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink