Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316366 - MOXy - NPE occurs when xml-path for attribute doesn't contain @
Summary: MOXy - NPE occurs when xml-path for attribute doesn't contain @
Status: RESOLVED 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: Matt MacIvor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 15:37 EDT by David McCann CLA
Modified: 2022-06-09 10:08 EDT (History)
1 user (show)

See Also:


Attachments
proposed fix and updated tests (19.75 KB, patch)
2010-06-11 09:42 EDT, Matt MacIvor 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-06-09 15:37:13 EDT
When configuring a direct mapping to an attribute via external metadata if the xml-path does not contain an '@' a null pointer exception will occur.  See the following trace:


Caused by: java.lang.NullPointerException
	at org.eclipse.persistence.internal.oxm.XMLDirectMappingNodeValue.marshalSingleValue(XMLDirectMappingNodeValue.java:76)
	at org.eclipse.persistence.internal.oxm.XMLDirectMappingNodeValue.marshal(XMLDirectMappingNodeValue.java:57)
	at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:104)
	at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:60)
	at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:336)
	at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:324)
	at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:327)
	at org.eclipse.persistence.oxm.XMLMarshaller.marshal(XMLMarshaller.java:919)
	at org.eclipse.persistence.oxm.XMLMarshaller.marshal(XMLMarshaller.java:734)
	... 21 more
Comment 1 Matt MacIvor CLA 2010-06-11 09:42:42 EDT
Created attachment 171723 [details]
proposed fix and updated tests
Comment 2 Matt MacIvor CLA 2010-06-11 11:29:07 EDT
Attached patch checked into trunk branch in SVN
Leaving bug open pending check in into 2.1.1

Reviewed by Blaise Doughan
Comment 3 Matt MacIvor CLA 2010-06-24 14:44:51 EDT
Fix backported into 2.1 stream.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:08:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink