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

Bug 314889

Summary: Error creating JAXB Context when a Map has an Enumeration as a key or value
Product: z_Archived Reporter: Matt MacIvor <matt.macivor>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Fix and Test Case none

Description Matt MacIvor CLA 2010-05-28 10:59:43 EDT
When creating a JAXB context from a class that contains a Map property with a Key or Value of an Enumeration type, one of two issues arises.

If the Enumeration is included in the initial list of classes to process, a DescriptorException is thrown because EclipseLink generated a CompositeObjectMapping and sets the Enumeration as the reference class. This fails because no descriptors are generated for Enumerations.

If the Enumeration was not included in the initial list of classes to process, the context is created, but the DirectMapping for the Enumeration doesn't contain the required Converter so Unmarshalling will fail, and Marshalling may be incorrect as the XmlEnumValue annotations won't have been processed.
Comment 1 Matt MacIvor CLA 2010-05-28 11:05:31 EDT
Created attachment 170358 [details]
Proposed Fix and Test Case
Comment 2 Matt MacIvor CLA 2010-05-28 11:35:01 EDT
Attached patch checked into SVN
Code Reviewed by Blaise Doughan
Comment 3 Matt MacIvor CLA 2010-05-28 11:43:25 EDT
Fixes and Test Cases checked in
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:16:15 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:30:33 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink