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] Commented: (CONFIGURATION-259) ConfigurationFactory Merge is broken
Date Wed, 28 Mar 2007 14:46:25 GMT

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

Oliver Heger commented on CONFIGURATION-259:
--------------------------------------------

Is it possible that your data structures contain some ambiguity, so that the merge algorithm
cannot decide, which nodes are list nodes? The following section of the user guide discusses
this topic:

http://jakarta.apache.org/commons/configuration/howto_combinedconfiguration.html#Node_combiners

If this is the case, you can explicitly mark the affected nodes as list nodes (this is explained
in the section about DefaultConfigurationBuilder).

> 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


Mime
View raw message