Hi Mukul,

Mukul Gandhi <muk...@apache.org> wrote on 06/08/2011 12:02:59 AM:

> > 2)       Also under high load, I occasionally get this stack trace
(this is
> > not the cause of or symptom of item 1, it is a separate issue occurring
at
> > separate times)
>
> > java.lang.NullPointerException:
> > (no message)
> > at org.apache.xerces.dom.ParentNode.nodeListItem(Unknown Source)
> > at org.apache.xerces.dom.ParentNode.item(Unknown Source)
> > at freemarker.ext.dom.NodeListModel.<init>(NodeListModel.java:89)
> > at freemarker.ext.dom.NodeModel.getChildNodes(NodeModel.java:302)
> > at freemarker.ext.dom.ElementModel.get(ElementModel.java:124)
> > at freemarker.core.Dot._getAsTemplateModel(Dot.java:76)
>
> The null pointer originates from your framework/application classes
> (Dot.java -> ElementModel.java & so on). This may be an application
> issue. You may run a debug session to see, which object along this
> stack trace is null and on what data it is dependent on.

No, I'm 99.99% sure this is a threading issue. ParentNode.nodeListItem() is
one of several places you can get a NullPointerException if you don't
synchronize.

There's really no other way to get an NPE there. The application is merely
passing in an int to the item() method. That either returns a Node or null
if the index isn't valid.

> --
> Regards,
> Mukul Gandhi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-users-h...@xerces.apache.org

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Reply via email to