Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325992

Summary: JPA metadata error message should include class
Product: z_Archived Reporter: James Sutherland <jamesssss>
Component: EclipselinkAssignee: Project Inbox <eclipselink.orm-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: michael.f.obrien, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description James Sutherland CLA 2010-09-22 13:08:49 EDT
All JPA metadata errors should include the Class/Entity the error is related to (also the attribute).

Caused By: Exception [EclipseLink-7333] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The reference column name [f_name] mapped on the element [field majorGeneral] does correspond to a valid field on the mapping reference.

For descriptors we throw a DescriptorException that contains the descriptor and mapping, perhaps we should be throwing a MetadataException that has similar info, at a minimum the class needs to be passed as an argument to the exception message.
Comment 1 Michael OBrien CLA 2010-10-01 20:05:52 EDT
>I agree, we need to print out the attribute as well - see Metamodel specific ehr bug # 326317
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:06:29 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink