You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Elifarley Callado Coelho Cruz <el...@gmail.com> on 2006/03/07 03:31:09 UTC

[configuration 1.2] Unexpected 'NoSuchMethodError' exception

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

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


Re: [configuration 1.2] Unexpected 'NoSuchMethodError' exception

Posted by Elifarley Callado Coelho Cruz <el...@gmail.com>.
Oliver,

After further investigation, I have found that my Eclipse launch
configuration had an error...

Thanks for your response, and sorry for unfoundedly suspecting of jar
corruption (well, my suspicion didn't quite have a sound logic
anyway).

On 3/8/06, Oliver Heger <ol...@t-online.de> wrote:
> 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
>
>

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


Re: [configuration 1.2] Unexpected 'NoSuchMethodError' exception

Posted by Oliver Heger <ol...@t-online.de>.
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