Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316507 - JAXB Externalized Metadata: Different exception should be thrown when composite is mapped to transient class
Summary: JAXB Externalized Metadata: Different exception should be thrown when composi...
Status: RESOLVED FIXED
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: David McCann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-10 14:08 EDT by David McCann CLA
Modified: 2022-06-09 10:08 EDT (History)
0 users

See Also:


Attachments
Proposed fix. (5.22 KB, patch)
2010-09-22 15:25 EDT, David McCann CLA
no flags Details | Diff
Supporting test cases (2.22 KB, patch)
2010-09-22 15:25 EDT, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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