Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 74912 invoked from network); 9 Oct 2004 11:17:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Oct 2004 11:17:56 -0000 Received: (qmail 9125 invoked by uid 500); 9 Oct 2004 11:17:51 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 8961 invoked by uid 500); 9 Oct 2004 11:17:49 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 8940 invoked by uid 99); 9 Oct 2004 11:17:48 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_60_70,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [205.160.101.145] (HELO hqexch01.upstate.com) (205.160.101.145) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 09 Oct 2004 04:17:47 -0700 Received: from IQUITOS (81-202-64-48.user.ono.com [81.202.64.48]) by hqexch01.upstate.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id SRSYJWXZ; Sat, 9 Oct 2004 07:21:30 -0400 Reply-To: From: "Eric Pugh" To: "Mark.Woodman" Cc: "Commons-Dev" Subject: [configuration] RE: Commons/Config Date: Sat, 9 Oct 2004 13:17:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0063_01C4AE02.5CBD8B70" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <000601c4ad95$97f9cf40$c701a8c0@Woodman> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0063_01C4AE02.5CBD8B70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit MessageHi Mark.. You should send these to the mailing list, as you can then have exposure to your question by lots of experts, and everybody can learn! I am CC the list back. First off, check out the RC2, that has many many fixes. And 1.0 is expected as soon as Henning has a chance to cut it. For your problem, I think everythign is relative to the working directory. So, what you can do is set up your file name as ../config/config_sub1.properties. This will get around your initial issue. I think the idea would always be to run relative from your working directory unless you provided a full path. Also, the latest version in CVS, which will be 1.0 Real Soon Now has a bunch of much better path resolution code, applied in a more global manner. Eric -----Original Message----- From: Mark.Woodman [mailto:Mark.Woodman@ISSinc.com] Sent: Saturday, October 09, 2004 2:19 AM To: epugh@upstate.com Subject: RE: Commons/Config Eric, I haven't seen any documentation that answers this question, so I was hoping you might be able to help. Is there a way to have a configuration file specify that internal resources should be found relative to the location of itself, rather than relative to the location of the working directory? The build we have of the config package (August 11) seems to always use the latter. If the working directory doesn't contain the config file we're using, we're up the proverbial creek. For example, lets say the working directory is: /app/bin And the config files live here: /app/config/config_main.xml /app/config/config_sub1.properties /app/config/config_sub2.properties And the contents of config_main.xml is: When I try to load config_main.xml (and the working directory is /app/bin), the ConfigurationFactory tries to find /app/bin/config_sub1.properties and promptly throws an Exception. This seems to be a show-stopper for us. Is this expected behavior, or has it changed since August, or is there a way to tell the configuration to use paths relative to the config file? Thanks for your help, Mark ______________________________ Mark Woodman 719.234.0670 Intelligent Software Solutions Email: Mark.Woodman@ISSinc.com ------=_NextPart_000_0063_01C4AE02.5CBD8B70--