commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: [Configuration] Exception while trying to use XPathExpressionEngine
Date Sat, 19 Feb 2011 15:48:02 GMT
Am 19.02.2011 15:34, schrieb Moein Enayati:
> Any thing goes ok
> when I download and use new version of configuration library (
> commons.configuration-1.6)
>
> Moein
>
>

This is strange. In order to use XPathExpressionEngine, you need Commons 
JXPath as dependency on your class path as document in [1]. This is 
independent on the version of Commons Configuration.

Oliver

[1] http://commons.apache.org/configuration/dependencies.html

>
>
> On Sat, Feb 19, 2011 at 5:35 PM, Moein Enayati<moein.enayati@gmail.com>wrote:
>
>> Dear All
>>
>> I have a new problem in using XPathExpressionEngine as described here :
>>
>> in Configurations User-Guide there is a tutor on the usage says :
>>
>> The XPATH expression engine<http://commons.apache.org/configuration/userguide/howto_xml.html#The_XPATH_expression_engine>
>> *HierarchicalConfiguration config = ...
>> config.setExpressionEngine(new XPathExpressionEngine());*
>>
>>
>> But when I try to do so , an exception throws :
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/commons/jxpath/ri/model/NodePointerFactory
>>          .....
>>          .....
>>          .....
>>
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.commons.jxpath.ri.model.NodePointerFactory
>>          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>          at java.security.AccessController.doPrivileged(Native Method)
>>          at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>          ... 4 more
>>
>>
>>
>>
>>
>> I've searched a lot , but the best thing I could find was { the link<http://apache-commons.680414.n4.nabble.com/jira-Created-CONFIGURATION-234-Documentation-Dependencies-DefaultConfigurationBuilder-needs-commons-h-td704632.html>}
but it's not applicable.
>>
>>
>> would you please help me how to do o it ? I only want to have XPath
>> search/find aproach to find exact property .
>>
>>
>> thanks/Moein
>>
>>
>>
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message