Robby
The documentation is not very clear on this:
================================================
The Spring Configurator uses Spring's extensible XML authoring
features and therefore it can be directly used in your Spring bean
configurations. Usually you add the configurator to your global web
application context configuration (which is usually located at
/WEB-INF/applicationContext.xml). The extensible XML authoring
requires that you use the schema based configuration for Spring. Just
add the required namespace definition, a reference to the configurator
XML schema to your bean configuration:
================================================
When I am creating a block I don't have applicationContext.xml. I have :

block-application-context.xml
block-servlet-service.xml

And adding the configuration to either will result in:

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Detected cyclic loading of URL
[file:/home/mansour/workspace/pipelines/contents/target/classes/META-INF/cocoon/spring/block-servlet-service.xml]
- check your import definitions!
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:324)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at 
org.apache.cocoon.spring.configurator.impl.AbstractSettingsElementParser.handleImport(AbstractSettingsElementParser.java:207)
        at 
org.apache.cocoon.spring.configurator.impl.AbstractSettingsElementParser.handleBeanInclude(AbstractSettingsElementParser.java:197)
        at 
org.apache.cocoon.spring.configurator.impl.AbstractSettingsElementParser.parse(AbstractSettingsElementParser.java:154)


So how do I add properties when doing development ??
However, when you run
mvn jetty:run

the configured applicationContext.xml comes with these configuration.



On Mon, Nov 5, 2012 at 6:15 PM, Robby Pelssers <robby.pelss...@nxp.com> wrote:
> Did you check if in your application context the cocoon-spring-configurator 
> is configured?  For how-to please double check the documentation.
>
> http://cocoon.apache.org/subprojects/configuration/spring-configurator/index.html
>
>   <!-- Activate Cocoon Spring Configurator -->
>   <configurator:settings runningMode="dev"/>
>
> Robby
>
> -----Original Message-----
> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
> Sent: Monday, November 05, 2012 6:46 PM
> To: users@cocoon.apache.org
> Subject: Re: Cocoon 3.0-alpha sitemap properties
>
> Robby,
> Thank you for your reply. I don't see how the issue relates to the typo.
> Assuming this my current sitemap:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap";
> xmlns:servlet="http://apache.org/cocoon/servlet";
> xmlns:controller="http://apache.org/cocoon/controller";>
>
>     <map:pipelines>
>         <map:pipeline>
>
>             <map:match pattern="article/{id}">
>                 <map:generate
> src="${base.path}/workspace/pipelines/repo/articles/{map:id}.xml" />
>                 <map:transform src="sheets/article.xsl" />
>                 <map:serialize />
>             </map:match>
>
>             <!--<map:match pattern="book/{id}">
>                 <map:transform
> src="${base.path}/workspace/pipelines/docbook-xsl-snapshot/html/docbook.xsl"
> />
>                 <map:generate
> src="/home/mansour/workspace/pipelines/repo/books/{map:id}.xml" />
>                 <map:transform src="sheets/book.xsl" />
>                 <map:serialize/>
>             </map:match> -->
>
>         </map:pipeline>
>     </map:pipelines>
>
> </map:sitemap>
>
>
> The error I am recieving is :
> DEBUG MemoryResourceStore - reading resource 
> com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.class
> DEBUG MemoryResourceStore - reading resource 
> com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.class
> WARN  URLConnectionUtils - Can't close input stream from 
> file:/home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/${base.path}/workspace/pipelines/repo/articles/ex.xml
> java.io.FileNotFoundException:
> /home/mansour/workspace/pipelines/contents/src/main/resources/COB-INF/${base.path}/workspace/pipelines/repo/articles/ex.xml
> (No such file or directory)
>         at java.io.FileInputStream.open(Native Method)
>         at java.io.FileInputStream.<init>(FileInputStream.java:138)
>         at java.io.FileInputStream.<init>(FileInputStream.java:97)
>         at 
> sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
>         at 
> sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
>         at 
> org.apache.cocoon.pipeline.util.URLConnectionUtils.closeQuietly(URLConnectionUtils.java:44)
>         at org.apache.cocoon.sax.util.XMLUtils.toSax(XMLUtils.java:119)
>         at 
> org.apache.cocoon.sax.component.XMLGenerator$URLGenerator.execute(XMLGenerator.java:385)
>         at 
> org.apache.cocoon.sax.component.XMLGenerator.execute(XMLGenerator.java:104)
>
>
>
> ==========================
> If you notice, the property is never substituted for its value. The property 
> is specified in META-INF/cocoon/properties/dev/app.properties
>
> base.path=/home/mansour/
>
>
>
> Thank you for your time.
>
>
>
>
> On Mon, Nov 5, 2012 at 2:58 AM, Robby Pelssers <robby.pelss...@nxp.com> wrote:
>> Sorry...
>>
>> I will rephrase this ;-)
>>
>> In your property you used 'documenation'  --> typo
>>
>> Robby
>>
>> -----Original Message-----
>> From: Robby Pelssers [mailto:robby.pelss...@nxp.com]
>> Sent: Monday, November 05, 2012 8:54 AM
>> To: users@cocoon.apache.org
>> Subject: RE: Cocoon 3.0-alpha sitemap properties
>>
>> =/home/mansour/docs/documentation  (value of property you defined)
>> =/home/mansour/docs/documentation  (correct path i assume)
>>
>> -----Original Message-----
>> From: Mansour Al Akeel [mailto:mansour.alak...@gmail.com]
>> Sent: Saturday, November 03, 2012 10:10 PM
>> To: users@cocoon.apache.org
>> Subject: Cocoon 3.0-alpha sitemap properties
>>
>> I created a block for C3.0 and tried to use properties defined in a
>> *.properties file. The logs show that the file has been found and I
>> can see that properties are found loaded,
>>
>> for example:
>>
>>
>>  935 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
>> impl.SettingsBeanFactoryPostProcessor - Property:
>> base.path=/home/mansour/docs/documenation
>>  936 2012-11-03 20:53:12,369 btpool0-1 DEBUG
>> impl.SettingsBeanFactoryPostProcessor - Property: sun.cpu.isalist=
>>  937 2012-11-03 20:53:12,369 btpool0-1 DEBUG
>> impl.SettingsBeanFactoryPostProcessor - ===== Settings End =====
>>  938 2012-11-03 20:53:12,369 btpool0-1 DEBUG 
>> support.DefaultListableBeanFactory - Finished creating instance of bean 
>> 'org.apache.cocoon.configuration.Settings'
>>
>> However, doing this in my sitemap.xmap:
>>
>>   <map:match pattern="doc/{1}">
>>           <map:read src="${base.path}/welcome.html" />
>>       </map:match>
>>     </map:pipeline>
>>
>> Does not work, and it reports that file is not found.
>>
>> Any idea or documentation for this ??
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
>> For additional commands, e-mail: users-h...@cocoon.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
>> For additional commands, e-mail: users-h...@cocoon.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
>> For additional commands, e-mail: users-h...@cocoon.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
>

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

Reply via email to