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

Bug 331576

Summary: MOXy: Issues with XmlPaths and attributes
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Supporting tests none

Description David McCann CLA 2010-12-01 13:05:08 EST
Given the following annotations:

@XmlElements({@XmlElement(type=Integer.class), @XmlElement(type=Float.class)})
@XmlPaths({@XmlPath("integers/@my-integer"), @XmlPath("floats/my-float/text()")})
public Object thing;

We will get the following exception during JAXBContext creation:

javax.xml.bind.JAXBException: 
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-110] (Eclipse Persistence Services - 2.2.0.qualifier): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Descriptor is missing for class [java.lang.Integer].
Mapping: org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping[thing]
Descriptor: XMLDescriptor(org.eclipse.persistence.testing.jaxb.annotations.xmlpaths.Employee --> [DatabaseTable(employee)])
Comment 1 David McCann CLA 2010-12-09 10:44:12 EST
Created attachment 184863 [details]
Proposed fix
Comment 2 David McCann CLA 2010-12-09 10:44:40 EST
Created attachment 184864 [details]
Supporting tests
Comment 3 David McCann CLA 2010-12-09 11:34:29 EST
Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected; jaxb/annotations/xmlpaths/XmlPathsTestCases; jaxb/externalizedmetadata/xmlelements/XmlElementsTestCases

Revision: 8671
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:31:28 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink