[
https://issues.apache.org/jira/browse/CONFIGURATION-511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Oliver Heger resolved CONFIGURATION-511.
----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0
The whole mechanism for locating configuration files has been reworked and can
now be customized. So I think this issue can be closed.
> ConfigurationUtils cannot locate classpath file when current Thread is RMI
> --------------------------------------------------------------------------
>
> Key: CONFIGURATION-511
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-511
> Project: Commons Configuration
> Issue Type: Bug
> Affects Versions: 1.6, 1.8, 1.9
> Reporter: Lorenz Schumann
> Fix For: 2.0
>
>
> I noticed the problem when a registered MBean method is invoked over JMX
> (=RMI) and it calls ConfigurationUtils.locate("some.properties").
> The classloader is not able to find the resource then.
> A possible fix would be to change
> ClassLoader loader = Thread.currentThread().getContextClassLoader();
> to
> ClassLoader loader = ConfigurationUtils.class.getClassLoader();
> in method locateFromClasspath. But i am not sure what other Effects that
> would have since I have no insight into commons-configuration.
> Tested with 1.6, 1.8, 1.9.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)