Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 31677 invoked from network); 8 Jul 2010 01:58:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Jul 2010 01:58:30 -0000 Received: (qmail 78957 invoked by uid 500); 8 Jul 2010 01:58:29 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 78624 invoked by uid 500); 8 Jul 2010 01:58:28 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 78616 invoked by uid 99); 8 Jul 2010 01:58:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 01:58:27 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of xuedm79@gmail.com designates 74.125.83.43 as permitted sender) Received: from [74.125.83.43] (HELO mail-gw0-f43.google.com) (74.125.83.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jul 2010 01:58:19 +0000 Received: by gwb11 with SMTP id 11so154797gwb.30 for ; Wed, 07 Jul 2010 18:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=uXMqtv+GHvR/I8sJL6WpM1bsg6fGXpW0HabqL6v2Abs=; b=eJ9xbWdZNmeFsOm5HwVEZeRy3DlL89Au5wqRB7BW4CU7zs+CRP9T3dLZWsr66YEncf 6rTfKukIcmUwbnX4zIdzCuN8zu/q82Cz4d30s3QUMgN5Y1o4OX1Aaqff9MxX5PKHq4B0 /2Z+cnFlfPi7g1i0YdJqZumIIK4GtKyNIWIrU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=tF1t5VEcVNMMxjhttbJX+Qx37RslZC+kimOL58RyyLi7BFlHukzdEuS7cc6KoxgcfH x9pAb0EsUdyMssLcvJRzlSZWAAZJjYo+iS95262y2FlFXUCbr/j625Pi6d1sCN1YrsvH 5cTyZNw4YRysFWRoj+ZOnpu5yBlS2wr+DfMtA= MIME-Version: 1.0 Received: by 10.90.90.11 with SMTP id n11mr6911361agb.29.1278554218587; Wed, 07 Jul 2010 18:56:58 -0700 (PDT) Received: by 10.151.98.17 with HTTP; Wed, 7 Jul 2010 18:56:58 -0700 (PDT) Date: Thu, 8 Jul 2010 09:56:58 +0800 Message-ID: Subject: [jxpath] UnsupportedOperationException from RootContext From: =?UTF-8?B?6Jab5LiB6JCM?= To: user@commons.apache.org Content-Type: multipart/alternative; boundary=0016361e8742066589048ad69a2b X-Virus-Checked: Checked by ClamAV on apache.org --0016361e8742066589048ad69a2b Content-Type: text/plain; charset=UTF-8 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) --0016361e8742066589048ad69a2b--