commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Kshirsagar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML
Date Sun, 23 Jun 2013 15:14:20 GMT

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

Anurag Kshirsagar commented on CONFIGURATION-297:
-------------------------------------------------

Hi Jin, 
Can you please let me know what version of commons-lang and commons-configuration did you
used to resolve this? I am using the latest commons-lang 2.6 and commons-configuration 1.9
and I am still getting this error. Any help would be much appreciated. 

Thanks
Anurag

                
> NoSuchMethodError if reloading strategy is specified in configuration XML
> -------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-297
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-297
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Windows XP, WebLogic Portal Server 10.0
>            Reporter: Jin Voon
>             Fix For: 1.5
>
>
> 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="uup.properties" throwExceptionOnMissing="true" config-name="uup"
config-optional="true">
> 			<reloadingStrategy refreshDelay="10000" 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 can confirm I have all the required commons jars in my classpath.  Would anyone
know what the problem is?  Is there something wrong with my configuration file or is there
something more major?  Thanks!

--
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