commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONFIGURATION-548) NoSuchMethodError if reloading strategy is specified in configuration XML - coommons-lang 2.6, commons configuration 1.9
Date Mon, 24 Jun 2013 20:28:20 GMT

    [ https://issues.apache.org/jira/browse/CONFIGURATION-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13692339#comment-13692339
] 

Oliver Heger commented on CONFIGURATION-548:
--------------------------------------------

This is the same situation as for CONFIGURATION-297, and the answer is the same, too: It is
with a high probability a classpath issue. Please check your classpath again and also make
sure that you do not have multiple versions of required libraries.

I don't know Weblogic, but it may be the case that the server ships older versions of some
Commons libraries in its lib directory and these versions take precedence over others in your
classpath.
                
> NoSuchMethodError if reloading strategy is specified in configuration XML - coommons-lang
2.6, commons configuration 1.9
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-548
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-548
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.9
>         Environment: Windows, weblogic server 10.3
>            Reporter: Anurag Kshirsagar
>              Labels: newbie
>             Fix For: 2.0
>
>
> I'm using the DefaultConfigurationBuilder to load the config.xml which contains the configuration
definitions.
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
> builder.setFile(new File("config.xml"));
> CombinedConfiguration cc = builder.getConfiguration(true);
> It definitely finds the config.xml file, but it keeps throwing java.lang.NoSuchMethodError:
getClass during the loading.
> java.lang.NoSuchMethodError: getClass
> at org.apache.commons.configuration.beanutils.BeanHelper.loadClass(BeanH
> elper.java:297)
> at org.apache.commons.configuration.beanutils.BeanHelper.fetchBeanClass(
> BeanHelper.java:322)
> at org.apache.commons.configuration.beanutils.BeanHelper.createBean(Bean
> Helper.java:244)
> at org.apache.commons.configuration.beanutils.BeanHelper.createBean(Bean
> Helper.java:266)
> at org.apache.commons.configuration.beanutils.BeanHelper.initBean(BeanHe
> lper.java:176)
> The config.xml file is:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!-- This is the configuration file for the Apache Commons Configuration. -->
> <configuration>
> <override>
> <properties fileName="env.properties" throwExceptionOnMissing="true" config-name="uup"
config-optional="true">
> <reloadingStrategy refreshDelay="10" config-class="org.apache.commons.configuration.reloading.FileChangedReloadingStrategy"/>
> </properties>
> </override>
> </configuration>
> If I remove the reloadingStrategy element from the config.xml file, everything works
properly. I am sure  I have all the required commons jars in my classpath.
> I read on another thread that I need to use latest version of commons-lang.
> I am using commons-long 2.6 and commons-configuration 1.9. Any help is much appreciated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message