commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Banke (JIRA)" <>
Subject [jira] Commented: (CONFIGURATION-259) ConfigurationFactory Merge is broken
Date Wed, 28 Mar 2007 15:00:25 GMT


Karl Banke commented on CONFIGURATION-259:

That sound sensible. I did experiment with the "at" property in the configuration file but
I was not very successful. Hence, I went with multiple configuration files. Thanks anyway.
However, I would consider to deprecate the ConfigurationFactory one way or the other.  

> ConfigurationFactory Merge is broken
> ------------------------------------
>                 Key: CONFIGURATION-259
>                 URL:
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Windows XP running Eclipse, JDK 1.4.2
>            Reporter: Karl Banke
>         Attachments: personendetails.xml, personensuche.xml, testconfig.xml,
> I am trying to merge two Configuration using the ConfigurationFactory and the additional
tag. It turns out that subsequent operations on the merged data provide wrong results. In
particular, after creating a particular subset from a loaded configuration, the subset is
empty. Strangely enough, when using DefaultConfigurationBuilder to load exactly the same configurations
this works properly. 
> So when initializing the configuration as follows, I get the following error:
> URL configURL = getClass().getResource(configFile);
> ConfigurationFactory factory = new ConfigurationFactory();
> factory.setConfigurationURL(configURL);
> myConfig = factory.getConfiguration();
> 60043
> java.util.NoSuchElementException: 'HvNr' doesn't map to an existing object
> 	at org.apache.commons.configuration.AbstractConfiguration.getLong(
> 	at de.awd.vertriebsportal.portal.person.TestConfiguration.main(
> Exception in thread "main" 
> But when initializing it like this everything works properly
> DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
>             builder.setURL(configURL);
>             myConfig = builder.getConfiguration();
> 60043
> 54564
> I will attach full source code and xml files

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message