Community
Participate
Working Groups
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)
Created attachment 210674 [details] Proposed change and test
Fix checked in to trunk and 2.3
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink