You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@community.apache.org by Ross Gardler <ro...@googlemail.com> on 2009/12/04 00:13:06 UTC

Why wrong tracker? (was Re: [jira] Commented: (COMDEV-4) External entity in XML causing null pointer exception during DocumentBuilder.parse)

I wonder why we are getting so many of these. I've only ever seen one
or two incorrectly classified issues on projects. Is there something
about the name of our tracker that makes people think it's the right
place?

Ross

2009/12/3 Bertrand Delacretaz (JIRA) <ji...@apache.org>:
>
>    [ https://issues.apache.org/jira/browse/COMDEV-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785249#action_12785249 ]
>
> Bertrand Delacretaz commented on COMDEV-4:
> ------------------------------------------
>
> Doesn't look like a Community Development issue...
>
>> External entity in XML causing null pointer exception during DocumentBuilder.parse
>> ----------------------------------------------------------------------------------
>>
>>                 Key: COMDEV-4
>>                 URL: https://issues.apache.org/jira/browse/COMDEV-4
>>             Project:           Community Development
>>          Issue Type: Question
>>            Reporter: sri kumar
>>
>> I was trying to parse a XML Document using DOM Parser.
>> I got null pointer exception while executing doc = builder.parse(xmlDataFile);
>> There were few entities in the XML data file. On removing a particular entity, i was able to parse the file successfully
>> The entity was some thing like this
>> <!ENTITY SAMPLE.TIF SYSTEM "SAMPLE.TIF" NDATA TIF>
>> What could be the reason?
>> EDIT:
>> Here is the code:
>>         DocumentBuilderFactory aFactory = DocumentBuilderFactory.newInstance();
>>         aFactory.setValidating(false);
>>         aFactory.setFeature("http://xml.org/sax/features/namespaces", false);
>>         aFactory.setFeature("http://apache.org/xml/features/validation/schema", false);
>>         aFactory.setIgnoringComments(true);
>>         builder = aFactory.newDocumentBuilder();
>>         doc = builder.parse(xmlDataFile);
>> This is the trace:
>>  at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.setChunkIndex(DeferredDocumentImpl.java:1944)
>>     at com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.appendChild(DeferredDocumentImpl.java:644)
>>     at com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.characters(AbstractDOMParser.java:1191)
>>     at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(XMLDTDValidator.java:862)
>>     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
>>     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
>>     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:107)
>>     at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
>>     at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
>>     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
>>     at XMLParser.Parse(XMLParser.java:89)
>>     at Main.main(Main.java:116)
>> 89 line number points to -> doc = builder.parse(xmlDataFile);
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>



-- 
Ross Gardler

OSS Watch - supporting open source in education and research
http://www.oss-watch.ac.uk

Re: Why wrong tracker? (was Re: [jira] Commented: (COMDEV-4) External entity in XML causing null pointer exception during DocumentBuilder.parse)

Posted by Ted Dunning <te...@gmail.com>.
COM \approx DOM?

On Thu, Dec 3, 2009 at 3:13 PM, Ross Gardler <ro...@googlemail.com>wrote:

> I wonder why we are getting so many of these. I've only ever seen one
> or two incorrectly classified issues on projects. Is there something
> about the name of our tracker that makes people think it's the right
> place?
>
> Ross
>
> 2009/12/3 Bertrand Delacretaz (JIRA) <ji...@apache.org>:
> >
> >    [
> https://issues.apache.org/jira/browse/COMDEV-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12785249#action_12785249]
> >
> > Bertrand Delacretaz commented on COMDEV-4:
> > ------------------------------------------
> >
> > Doesn't look like a Community Development issue...
> >
> >> External entity in XML causing null pointer exception during
> DocumentBuilder.parse
> >>
> ----------------------------------------------------------------------------------
> >>
> >>                 Key: COMDEV-4
> >>                 URL: https://issues.apache.org/jira/browse/COMDEV-4
> >>             Project:           Community Development
> >>          Issue Type: Question
> >>            Reporter: sri kumar
> >>
> >> I was trying to parse a XML Document using DOM Parser.
> >> I got null pointer exception while executing doc =
> builder.parse(xmlDataFile);
> >> There were few entities in the XML data file. On removing a particular
> entity, i was able to parse the file successfully
> >> The entity was some thing like this
> >> <!ENTITY SAMPLE.TIF SYSTEM "SAMPLE.TIF" NDATA TIF>
> >> What could be the reason?
> >> EDIT:
> >> Here is the code:
> >>         DocumentBuilderFactory aFactory =
> DocumentBuilderFactory.newInstance();
> >>         aFactory.setValidating(false);
> >>         aFactory.setFeature("http://xml.org/sax/features/namespaces",
> false);
> >>         aFactory.setFeature("
> http://apache.org/xml/features/validation/schema", false);
> >>         aFactory.setIgnoringComments(true);
> >>         builder = aFactory.newDocumentBuilder();
> >>         doc = builder.parse(xmlDataFile);
> >> This is the trace:
> >>  at
> com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.setChunkIndex(DeferredDocumentImpl.java:1944)
> >>     at
> com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl.appendChild(DeferredDocumentImpl.java:644)
> >>     at
> com.sun.org.apache.xerces.internal.parsers.AbstractDOMParser.characters(AbstractDOMParser.java:1191)
> >>     at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(XMLDTDValidator.java:862)
> >>     at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:463)
> >>     at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
> >>     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:107)
> >>     at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:225)
> >>     at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
> >>     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
> >>     at XMLParser.Parse(XMLParser.java:89)
> >>     at Main.main(Main.java:116)
> >> 89 line number points to -> doc = builder.parse(xmlDataFile);
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
>
> --
> Ross Gardler
>
> OSS Watch - supporting open source in education and research
> http://www.oss-watch.ac.uk
>



-- 
Ted Dunning, CTO
DeepDyve