Community
Participate
Working Groups
A null pointer exception occurs when marshalling a null wrapped in a JAXBElement through EclipseLink JAXB. java.lang.NullPointerException at org.eclipse.persistence.jaxb.JAXBMarshaller.wrapObjectInXMLRoot(JAXBMarshaller .java:464) at org.eclipse.persistence.jaxb.JAXBMarshaller.wrapObject(JAXBMarshaller.java:453 ) at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:377) at testing.JaxbElementNull.main(JaxbElementNull.java:65) This is due to a missing null check when determining if the value wrapped the the JAXBElement is a binary type.
Created attachment 189527 [details] Proposed Fix.
Attached patch checked in to SVN Reviewed by David McCann
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink