You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jin Voon (JIRA)" <ji...@apache.org> on 2007/10/03 04:14:51 UTC

[jira] Created: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

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


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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-297.
----------------------------------------

       Resolution: Invalid
    Fix Version/s: 1.5

This problem is not related to Commons Configuration.

> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

Posted by "Jin Voon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534688 ] 

Jin Voon commented on CONFIGURATION-297:
----------------------------------------

Hi,
Please close this ticket.  It is related to the class path issue (hell) as suggested.  Thanks a lot for your help!

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532140 ] 

Oliver Heger commented on CONFIGURATION-297:
--------------------------------------------

This does not appear to be a specific problem of Commons Configuration, but a class path issue (welcome to jar hell ;-)

>From tracking down the stack trace, the exception is thrown at a point where org.apache.commons.lang.ClassUtils.getClass(String) is invoked. This class is part of Commons Lang. It seems that you have an older version of this library in your class path, in which the ClassUtils class does not have this method. Maybe a version of Commons Lang is already bundled with WebLogic Portal Server?

Try to pack the newest version of Commons Lang to your web application (i.e. in WEB-INF/lib).

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

Posted by "Jin Voon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531990 ] 

Jin Voon commented on CONFIGURATION-297:
----------------------------------------

Please note I tried this in an application running in WebLogic Portal Server.  When I tried it on a standalone Java app, this problem does not exists.

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CONFIGURATION-297) NoSuchMethodError if reloading strategy is specified in configuration XML

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534610 ] 

Oliver Heger commented on CONFIGURATION-297:
--------------------------------------------

Does this problem still persist? I tend to close this ticket because it obviously is not strictly related to Commons Configuration.

> 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
>
> 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.
-
You can reply to this email to add a comment to the issue online.