Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1698FD4E9 for ; Fri, 19 Oct 2012 09:50:20 +0000 (UTC) Received: (qmail 60361 invoked by uid 500); 19 Oct 2012 09:50:19 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 59949 invoked by uid 500); 19 Oct 2012 09:50:16 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 59890 invoked by uid 99); 19 Oct 2012 09:50:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 09:50:15 +0000 Date: Fri, 19 Oct 2012 09:50:15 +0000 (UTC) From: "Lorenz Schumann (JIRA)" To: issues@commons.apache.org Message-ID: <2016481852.219.1350640215485.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (CONFIGURATION-511) ConfigurationUtils cannot locate classpath file when current Thread is RMI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Lorenz Schumann created CONFIGURATION-511: --------------------------------------------- Summary: 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.9, 1.8, 1.6 Reporter: Lorenz Schumann 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira