commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From θ–›δΈθŒ <xued...@gmail.com>
Subject [jxpath] UnsupportedOperationException from RootContext
Date Thu, 08 Jul 2010 01:56:58 GMT
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 (xuedm79@gmail.com)

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