Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3
-
None
-
None
-
Windows XP running Eclipse, JDK 1.4.2
Description
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