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

Bug 316507

Summary: JAXB Externalized Metadata: Different exception should be thrown when composite is mapped to transient class
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: David McCann <david.mccann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix.
none
Supporting test cases none

Description David McCann CLA 2010-06-10 14:08:29 EDT
If Employee has a composite mapping to Address, which is marked transient, the following integrity exception is thrown:

Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-110] (Eclipse Persistence Services - @VERSION@.@QUALIFIER@): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Descriptor is missing for class [org.example.Address].
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[address]
Descriptor: XMLDescriptor(org.example.Employee --> [DatabaseTable(employee)])

We should detect this earlier (during Xml/Annotations processing or mappings generation) and throw a detailed exception.
Comment 1 David McCann CLA 2010-09-22 15:25:00 EDT
Created attachment 179402 [details]
Proposed fix.
Comment 2 David McCann CLA 2010-09-22 15:25:15 EDT
Created attachment 179403 [details]
Supporting test cases
Comment 3 David McCann CLA 2010-09-23 10:41:27 EDT
Reviewed by: matt.macivor@oracle.com
Tests:  jaxb/externalizedmetadata/xmltransient/XmlTransientTestCases; all unit tests pass as expected

Revision: 8232
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:03:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:08:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink