-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
8u5
-
None
If multiple threads call evaluate(InputSource) concurrently on different XPathExpression objects, they fail with the following exception:
org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:271)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:302)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:332)
at XPathRepro.lambda$main$0(XPathRepro.java:13)
at XPathRepro$$Lambda$1/142257191.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:305)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:332)
at XPathRepro.lambda$main$0(XPathRepro.java:13)
at XPathRepro$$Lambda$1/142257191.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:271)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:302)
... 4 more
See the attached XPathRepro.java for how to reproduce.
I think such errors would have been expected if the threads had called evaluate() on the same XPathExpression object. But the repro gives each thread its own instance of XPathExpression to work on, so I wouldn't expect any interference between the threads in this case.
org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:271)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:302)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:332)
at XPathRepro.lambda$main$0(XPathRepro.java:13)
at XPathRepro$$Lambda$1/142257191.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:305)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:332)
at XPathRepro.lambda$main$0(XPathRepro.java:13)
at XPathRepro$$Lambda$1/142257191.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:271)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:302)
... 4 more
See the attached XPathRepro.java for how to reproduce.
I think such errors would have been expected if the threads had called evaluate() on the same XPathExpression object. But the repro gives each thread its own instance of XPathExpression to work on, so I wouldn't expect any interference between the threads in this case.