Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370867 - Error in MOXy with java.net.URI
Summary: Error in MOXy with java.net.URI
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Denise Smith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 13:37 EST by Denise Smith CLA
Modified: 2022-06-09 10:08 EDT (History)
0 users

See Also:


Attachments
Proposed change and test (11.80 KB, patch)
2012-02-07 13:39 EST, Denise Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Denise Smith CLA 2012-02-07 13:37:50 EST
Create an Eclispelink JAXBContext with no classes specified and then try
to marshal or unmarshal an object typed as java.net.URI, MOXy throws an
exception stating that "a descriptor for class java.net.URI was not found in
the project".  However, JAXB RI supports this built-in type. 

[Exception [EclipseLink-25003] (Eclipse Persistence Services -
2.3.1.qualifier): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred marshalling the object
Internal Exception: Exception [EclipseLink-25007] (Eclipse Persistence
Services - 2.3.1.qualifier):
org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor for class java.net.URI was not found in
the project.  For JAXB, if the JAXBContext was bootstrapped using
TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo
as an input parameter.]
at
org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:326)
at testing.CapsTest.main(CapsTest.java:35)
Caused by: Exception [EclipseLink-25003] (Eclipse Persistence Services -
2.3.1.qualifier): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: An error occurred marshalling the object
Internal Exception: Exception [EclipseLink-25007] (Eclipse Persistence
Services - 2.3.1.qualifier):
org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor for class java.net.URI was not found in
the project.  For JAXB, if the JAXBContext was bootstrapped using
TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo
as an input parameter.
at
org.eclipse.persistence.exceptions.XMLMarshalException.marshalException(XMLMar
shalException.java:79)
at org.eclipse.persistence.oxm.XMLMarshaller.marshal(XMLMarshaller.java:521)
at
org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:324)
... 1 more
Caused by: Exception [EclipseLink-25007] (Eclipse Persistence Services -
2.3.1.qualifier): org.eclipse.persistence.exceptions.XMLMarshalException
Exception Description: A descriptor for class java.net.URI was not found in
the project.  For JAXB, if the JAXBContext was bootstrapped using
TypeMappingInfo[] you must call a marshal method that accepts TypeMappingInfo
as an input parameter.
at
org.eclipse.persistence.exceptions.XMLMarshalException.descriptorNotFoundInPro
ject(XMLMarshalException.java:121)
at
org.eclipse.persistence.oxm.XMLContext$XMLContextState.getSession(XMLContext.j
ava:1066)
at org.eclipse.persistence.oxm.XMLContext.getSession(XMLContext.java:332)
at org.eclipse.persistence.oxm.XMLMarshaller.marshal(XMLMarshaller.java:465)
Comment 1 Denise Smith CLA 2012-02-07 13:39:58 EST
Created attachment 210674 [details]
Proposed change and test
Comment 2 Denise Smith CLA 2012-02-08 10:41:19 EST
Fix checked in to trunk and 2.3
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:08:42 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink