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

Bug 370267

Summary: NULLPOINTER OCCURS FROM STAX SPACE EVENT CALL TO UNMARSHALRECORD CHARACTERS
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 changes none

Description Denise Smith CLA 2012-01-31 14:42:05 EST
If there are comments/spaces after the <?xml version="1.0"?> but before the first startelement event then a nullpointer can occur.  This is because everything on unmarshalrecord is typically initialized on the first start element so in the characters event that gets called there can be a null unmarshalContext

 at 
org.eclipse.persistence.oxm.record.UnmarshalRecord.characters(UnmarshalRecord.java:1034)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parseEvent(XMLStreamReaderReader.java:152)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:83)
    at 
org.eclipse.persistence.internal.oxm.record.XMLStreamReaderReader.parse(XMLStreamReaderReader.java:72)
    at 
org.eclipse.persistence.internal.oxm.record.SAXUnmarshaller.unmarshal(SAXUnmarshaller.java:847)
    at 
org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:626)
    at
Comment 1 Denise Smith CLA 2012-01-31 14:47:33 EST
Created attachment 210331 [details]
Proposed changes
Comment 2 Denise Smith CLA 2012-02-01 13:21:52 EST
Fixed to handle this case in characters method of UnmarshalRecord.  Checked in to 2.3.3 and trunk
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:07:38 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink