Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314889 - Error creating JAXB Context when a Map has an Enumeration as a key or value
Summary: Error creating JAXB Context when a Map has an Enumeration as a key or value
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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 10:59 EDT by Matt MacIvor CLA
Modified: 2022-06-09 10:30 EDT (History)
0 users

See Also:


Attachments
Proposed Fix and Test Case (7.39 KB, patch)
2010-05-28 11:05 EDT, Matt MacIvor CLA
no flags Details | Diff

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