Hi,

We were using JXPath 1.2 and met a tough issue in customer's environment. We
executed below code to count node set. It works fine with other customers
but only has issue in this one. This code doesn't always throw exception but
only occurs when server has run for couple days. We suspect it is
environment issue. However we don't know why and how to reproduce it.

((Integer) this.instanceContext.getValue("count(" + path + ")",
Integer.class)).intValue()

The exception trace is as below.

java.lang.UnsupportedOperationException
at
org.apache.commons.jxpath.ri.axes.RootContext.nextSet(RootContext.java:83)
at org.apache.commons.jxpath.ri.EvalContext.nextSet(EvalContext.java:321)
at
org.apache.commons.jxpath.ri.EvalContext.performIteratorStep(EvalContext.java:159)
at org.apache.commons.jxpath.ri.EvalContext.hasNext(EvalContext.java:118)
at
org.apache.commons.jxpath.ri.compiler.CoreFunction.functionCount(CoreFunction.java:309)
at
org.apache.commons.jxpath.ri.compiler.CoreFunction.computeValue(CoreFunction.java:217)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:314)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:362)
at
org.apache.commons.jxpath.ri.JXPathContextReferenceImpl.getValue(JXPathContextReferenceImpl.java:358)
        at net.xuedm.test.JXPathUtil.getNodeCount(JXPathUtil.java:35)

We wonder who has once met this issue or know the reason to cause it. Any
help will be appreciated.

-- 
Best regards,
Dingmeng Xue ([email protected])

Reply via email to