Description
Caused by: javax.xml.transform.TransformerException: Unknown error in XPath.
at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.execute(XPathAdapter.java:188)
at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.evaluateXPath(XPathUtils.java:145)
at com.gargoylesoftware.htmlunit.html.xpath.XPathUtils.getByXPath(XPathUtils.java:77)
... 51 more
Caused by: java.lang.NullPointerException
at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:390)
at org.apache.xml.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:565)
at org.apache.xml.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1142)
at org.apache.xml.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:463)
at org.apache.xpath.axes.AxesWalker.getNextNode(AxesWalker.java:335)
at org.apache.xpath.axes.AxesWalker.nextNode(AxesWalker.java:363)
at org.apache.xpath.axes.WalkingIterator.nextNode(WalkingIterator.java:195)
at org.apache.xpath.axes.NodeSequence.nextNode(NodeSequence.java:335)
at org.apache.xpath.axes.NodeSequence.runTo(NodeSequence.java:494)
at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:270)
at org.apache.xpath.axes.LocPathIterator.execute(LocPathIterator.java:212)
at com.gargoylesoftware.htmlunit.html.xpath.XPathAdapter.execute(XPathAdapter.java:167)
... 53 more
We are encountering the aforementioned issue randomly. Most of the time it works fine. We are assuming that this is caused by the fact that XPath object is not designed for multithreading access. I have tried searching for information about this issue however I did not find any solution/workaround, is there any way to fix this?