commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ferry <>
Subject [jxpath] race in getNodePointerFactories() ?
Date Fri, 13 Sep 2013 02:11:21 GMT

We're using Apache JXPath 1.3. We have multi-threaded code running

We're having an occasional NullPointerException coming out of

We've had a look at the code for this class, and wonder if
getNodePointerFactories is not synchronising correctly.

Other operations that read or write the attribute nodeFactoryArray ...
synchronize on nodeFactories.

But in getNodePointerFactories() ... it just returns the variable without
This makes us think that there is no happens-before in the
getNodePointerFactories() method.

I've put a snippet of the stack trace below.

Apologies if this has come up before, I didn't manage to find it after a
while searching.


        at org.apache.commons.jxpath.ri.model.NodePointer.newNodePointer(
        at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.<init>(
        at org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.<init>(
        at org.apache.commons.jxpath.ri.JXPathContextFactoryReferenceImpl.newContext(
        at org.apache.commons.jxpath.JXPathContext.newContext(

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message