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

Bug 370867

Summary: Error in MOXy with java.net.URI
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: Denise Smith <denise.mahar>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed change and test none

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