Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331576 - MOXy: Issues with XmlPaths and attributes
Summary: MOXy: Issues with XmlPaths and attributes
Status: CLOSED 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-12-01 13:05 EST by David McCann CLA
Modified: 2022-06-09 10:31 EDT (History)
0 users

See Also:


Attachments
Proposed fix (10.68 KB, patch)
2010-12-09 10:44 EST, David McCann CLA
no flags Details | Diff
Supporting tests (12.80 KB, patch)
2010-12-09 10:44 EST, 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-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