[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [jira] Commented: (CONFIGURATION-259) ConfigurationFactory Merge is
From:       "Karl Banke (JIRA)" <jira () apache ! org>
Date:       2007-03-28 14:59:21
Message-ID: 26409850.1175094025319.JavaMail.jira () brutus
[Download RAW message or body]


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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic