commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@t-online.de>
Subject Re: [configuration 1.2] Unexpected 'NoSuchMethodError' exception
Date Wed, 08 Mar 2006 16:43:06 GMT
Elifarley Callado Coelho Cruz wrote:

>I have a project in Eclipse in which I try to call the method
>'setReloadingStrategy' as follows:
>
>PropertiesConfiguration conf = new PropertiesConfiguration("blah");
>
>FileChangedReloadingStrategy RELOADING_STRATEGY = new
>FileChangedReloadingStrategy();
>
>conf.setReloadingStrategy(this.RELOADING_STRATEGY);
>
>The Eclipse editor window shows no compilation error, but when I run it, I get:
>
>java.lang.NoSuchMethodError:
>org.apache.commons.configuration.PropertiesConfiguration.setReloadingStrategy(Lorg/apache/commons/configuration/reloading/ReloadingStrategy;)V
>
>To temporarily solve this problem, I had to compile the source files
>found at the zip archive 'commons-configuration-1.2-ide.zip' (which
>comes with the binary dist of commons-configuration).
>
>Is the commons-configuration 1.2 archive corrupted ? Has anyone else
>experienced this kind of problem ?
>
>Thanks,
>Elifarley
>
>  
>
So far no problems have been reported. The reloading strategies exist
since version 1.1 and are probably one of the wider used elements of
Commons Configuration. So I am quite sure that we would have got much
feedback if the 1.2 jar was broken.

Do you have a special lounch configuration when you start your
application from eclipse? If the setReloadingStrategy() method cannot be
found, this means that the classpath must contain classes from the 1.0
version of Configuration. Perhaps in the JDK's lib/ext directory? Or
maybe bundled with another library you use?

Perhaps the article in [1] can help you to find out from where the
Configuration classes are loaded. It describes an utility class named
JWhich that does exactly that.

HTH
Oliver

[1] http://www.javaworld.com/javaworld/javatips/jw-javatip105.html

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


Mime
View raw message