commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CONFIGURATION-259) ConfigurationFactory Merge is broken
Date Fri, 30 Mar 2007 09:36:25 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Heger resolved CONFIGURATION-259.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4

Some hints were added to the JavaDocs of ConfigurationFactory and the user guide that recommend
the usage of DefaultConfigurationBuilder instead.

Maybe in the 1.5 release ConfigurationFactory can be deprecated and then removed with the
next major release (2.0).

> ConfigurationFactory Merge is broken
> ------------------------------------
>
>                 Key: CONFIGURATION-259
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-259
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Windows XP running Eclipse, JDK 1.4.2
>            Reporter: Karl Banke
>             Fix For: 1.4
>
>         Attachments: personendetails.xml, personensuche.xml, testconfig.xml, TestConfiguration.java
>
>
> 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(AbstractConfiguration.java:743)
> 	at de.awd.vertriebsportal.portal.person.TestConfiguration.main(TestConfiguration.java:84)
> 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message