commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allistair Crossley" <Allistair.Cross...@QAS.com>
Subject RE: Commons Config: Cannot locate configuration
Date Tue, 27 Sep 2005 13:34:58 GMT
Hi,

Figured this out. Factory has a setBasePath method.

Cheers anyway, A.

> -----Original Message-----
> From: Allistair Crossley 
> Sent: 27 September 2005 12:49
> To: commons-user@jakarta.apache.org
> Subject: Commons Config: Cannot locate configuration
> 
> 
> Hi,
>  
> I am just getting started with Commons Configuration. I've 
> been able to get the initial configuration file detected 
> which contains
>  
> <configuration>
>   <properties fileName="classes/pack/age/to/anotherconfig.xml" />
> </configuration>
>  
> However, the fileName here fails
> org.apache.commons.configuration.ConfigurationException: 
> Cannot locate configuration source 
> classes/pack/age/to/anotherconfig.xml
> at 
> org.apache.commons.configuration.AbstractFileConfiguration.loa
> d(AbstractFileConfiguration.java:183)
> at 
> org.apache.commons.configuration.AbstractFileConfiguration.loa
> d(AbstractFileConfiguration.java:166)
> 
> I read in the docs that fileName would be read relatively to 
> the main config file, which for me is in my web application 
> /WEB-INF/config.xml and I use getRealPath in my context 
> listener to load it on application startup.
> 
> Can anyone suggest how I can get my files within the main 
> config.xml found?
> 
> Cheers, Allistair.
> 
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
> -------------------------------------------------------
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLACK> 
> Disclaimer:  The information contained within this e-mail is 
> confidential and may be privileged. This email is intended 
> solely for the named recipient only; if you are not 
> authorised you must not disclose, copy, distribute, or retain 
> this message or any part of it. If you have received this 
> message in error please contact the sender at once so that we 
> may take the appropriate action and avoid troubling you 
> further.  Any views expressed in this message are those of 
> the individual sender.  QAS Limited has the right lawfully to 
> record, monitor and inspect messages between its employees 
> and any third party.  Your messages shall be subject to such 
> lawful supervision as QAS Limited deems to be necessary in 
> order to protect its information, its interests and its reputation.  
> 
> Whilst all efforts are made to safeguard Inbound and Outbound 
> emails, QAS Limited cannot guarantee that attachments are 
> virus free or compatible with your systems and does not 
> accept any liability in respect of viruses or computer 
> problems experienced.
> </FONT>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message