You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org> on 2014/06/27 06:41:24 UTC

[jira] [Resolved] (XERCESJ-1638) Java Null Pointer Exception when calling from JAXB Unmarshal Function

     [ https://issues.apache.org/jira/browse/XERCESJ-1638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1638.
-------------------------------------------

    Resolution: Invalid

Classes in com.sun.xml.internal.* and com.sun.org.apache.xerces.internal.* packages are not part of Apache Xerces. You appear to be using Oracle's JAXP implementation. We do not contribute to or have any influence over that implementation.

> Java Null Pointer Exception when calling from JAXB Unmarshal Function
> ---------------------------------------------------------------------
>
>                 Key: XERCESJ-1638
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1638
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: JAXP (javax.xml.parsers), SAX
>         Environment: Unix
>            Reporter: saicharan poduri
>              Labels: java, jaxb, nullpointerexception, xml
>
> I have a very large XML file (29GB) where every other alternate line is a XML. I am sending out the line to a unmarshaller which then creates java objects. I didn't face this problem when I tried my code on smaller files (~1GB).
> while(headerline!=null) {
> sCurrentLine = br.readLine();
> idDetails = IDUnmarshal.IDUnmarshall(sCurrentLine);
> idObjectList.add(idDetails);
> headerline = br.readLine();
> }
> I am getting the following null pointer exception
> java.lang.NullPointerException at com.sun.xml.internal.stream.Entity$ScannedEntity.close(Entity.java:439)
>      at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1404)
>      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
>      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
>      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
>      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
>      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
>      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
>      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
>      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
>      at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
>      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137)
>      at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:184)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org