You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dominic Tootell <do...@bbc.co.uk> on 2008/06/18 19:07:45 UTC

Properties and Cocoon Spring Configurator

Hi guys,

Has anyone else encountered this problem, where you cannot specify a
directory as the setting for the system property
org.apache.cocoon.settings?

According to the docs:
http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurat
or/1.0/1310_1_1.html, point 8 states:

*	If the system property org.apache.cocoon.settings is specified
and points to a property file, this is read. If the system property
points to a directory all property files from this directory are read in
alphabetical order and all property files from the sub directory named
[RUNNING_MODE] are read in alphabetical order. 


I have a properties file environment.properties in the directory
C\cmc\metadataservices\config.  However, if I specify the directory as
the value for the property
(-Dorg.apache.cocoon.settings=c:\cmc\metadataservices\config)  the
properties file does not get read, and I get the error:
Could not resolve placeholder 'database.cis.driver'
	at
org.apache.cocoon.spring.configurator.impl.AbstractSettingsBeanFactoryPo
stProcessor.processProperties
But if I specific value of the property to be the file directly
(-Dorg.apache.cocoon.settings=c:\cmc\metadataservices\config\environment
.properties), then it works.

Am I mis-reading the documentation, or is this a bug?  Does anyone know
the url to the bug tracking for cocoon 2.2 that I could search for
future reference?
Thanks,
/dom




http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Re: Properties and Cocoon Spring Configurator

Posted by Grzegorz Kossakowski <gr...@tuffmail.com>.
Dominic Tootell pisze:
> Hi guys,

Hi Dominic,

> Has anyone else encountered this problem, where you cannot specify a 
> directory as the setting for the system property org.apache.cocoon.settings?
> 
> According to the docs:  
> _http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1310_1_1.html_, 
> point 8 states:
> 
>     * If the system property org.apache.cocoon.settings is specified and
>       points to a property file, this is read. If the system property
>       points to a directory all property files from this directory are
>       read in alphabetical order and all property files from the sub
>       directory named [RUNNING_MODE] are read in alphabetical order.
> 
> 
> I have a properties file environment.properties in the directory 
> C\cmc\metadataservices\config.  However, if I specify the directory as 
> the value for the property 
> (-Dorg.apache.cocoon.settings=c:\cmc\metadataservices\config)  the 
> properties file does not get read, and I get the error:
> 
> Could not resolve placeholder 'database.cis.driver'
>         at 
> org.apache.cocoon.spring.configurator.impl.AbstractSettingsBeanFactoryPostProcessor.processProperties 
> 
> But if I specific value of the property to be the file directly 
> (-Dorg.apache.cocoon.settings=c:\cmc\metadataservices\config\environment.properties), 
> then it works.
> 
> Am I mis-reading the documentation, or is this a bug?  Does anyone know 
> the url to the bug tracking for cocoon 2.2 that I could search for 
> future reference?

This looks like a bug but after taking a quick look at the source code of Spring Configurator I fail 
to see the cause for it, though. Anyway, you can find information about issue tracking under 
"Project information" node in menu, see:
http://cocoon.apache.org/issue-tracking.html

General suggestion: before you try to run Cocoon with debugger you can see what's going on by 
checking logs (with DEBUG level set on). Spring Configurator puts a lot of useful information into logs.

-- 
Best regards,
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org