commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Noordermeer (JIRA)" <>
Subject [jira] Created: (CONFIGURATION-437) BasePath not set on with DefaultConfigurationBuilder/ConfigurationBuilderProvider
Date Tue, 01 Mar 2011 16:28:36 GMT
BasePath not set on with DefaultConfigurationBuilder/ConfigurationBuilderProvider

                 Key: CONFIGURATION-437
             Project: Commons Configuration
          Issue Type: Bug
    Affects Versions: 1.6, Nightly Builds
            Reporter: Mike Noordermeer

The DefaultConfigurationBuilder does not set the basepath of nested DefaultConfigurationBuilders:

I've the following structure:


I use a DefaultConfigurationBuilder, with the following contents in the

<properties fileName="../"/>
<configuration fileName="def-2.xml"/>

I use this code:

DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration c = builder.getConfiguration(true);

This gives an exception:

Caused by: org.apache.commons.configuration.ConfigurationException:
Cannot locate configuration source def-2.xml


Seems to be that AbstractFileConfiguration.basePath is not set by the
DefaultConfigurationBuilder.ConfigurationBuilderProvider, while it is
set by DefaultConfigurationBuilder.FileConfigurationProvider (in
initBeanInstance(Object, BeanDeclaration)).

I'll attach a quick n dirty fix against 1.6 (can't get trunk to build), but I doubt it's the
best fix. It's just a copy of FileConfigurationProvider#initBeanInstance in ConfigurationBuilderProvider.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message