cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: Connecting 2 blocks with C3.0
Date Sun, 10 Feb 2013 21:59:18 GMT
Hello Francesco,

I noticed from the read me file in the project you created as an example:



    IMPORTANT: be sure to use the latest Cocoon 3 SNAPSHOT artifacts
from ASF repository


Does this mean that block communication is not supported in 3.0.0-beta-1 ??


I am getting this error with the pom generated by cocoon archetype.

2013-02-09 17:27:28.070::WARN:  Failed startup of context
org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@c50e46{/,/home/mansour/workspace/flamenco/pipelines/channel-website/target/rcl/webapp}
java.lang.RuntimeException: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@19e681c
	at org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.invoke(ReloadingListener.java:298)
	at org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingListener.contextInitialized(ReloadingListener.java:150)
	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
	at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)

I will look deeper into this error, but I am very interested in
knowing if "block communication" is not supported except in the
snapshot.

Thank you.



On Sat, Feb 9, 2013 at 9:04 PM, Mansour Al Akeel
<mansour.alakeel@gmail.com> wrote:
> I am still looking for the way to call pipeline in another block and
> not an xslt file.
> For example:
>
> assuming I have a block called "contents" and the mounting path is
> "/contents" in the active configuration.
> What would be the url to call ?? Currently I have this:
>
>
>         <map:generate src="servlet:contents:/contents/documentId/{map:1}/{map:2}.xml"
> />
>
> My understanding (if like C2.2), I would be using:
>
> servlet:block-name:/mount-point/url-to-match
>
> Is this correct ??
>
>
>
> On Sat, Feb 9, 2013 at 8:33 PM, Mansour Al Akeel
> <mansour.alakeel@gmail.com> wrote:
>> I truly appreciate your help, and I agree with you that this needs to
>> be documented in a place where it's easy to find. It is taking me a
>> lot of time to try to figure out what is wrong.
>> I think it's related more to the running mode and the configurations.
>> For example when you declare a block as a dependency, its
>>
>> resources/META-INF/cocoon/spring/dev/mysite-servlet-service.xml
>>
>> has to have different name in the importing block, for example no two
>> blocks should have this:
>>
>> resources/META-INF/cocoon/spring/block-servlet-service.xml
>>
>> I am still investigating, and can not confirm that this is the issue.
>>
>> Additionally
>>
>>
>>   <!-- A Cocoon-Sitemap based servlet-service. -->
>>   <bean id="com.mycompany.mysite.service"
>> class="org.apache.cocoon.servlet.XMLSitemapServlet">
>>     <servlet:context mount-path="/mysite"
>> context-path="jar:classpath:/COB-INF/"/>
>>   </bean>
>>
>> in
>>
>> https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite/src/main/resources/META-INF/cocoon/spring/dev/mysite-servlet-service.xml
>>
>> needs a bit more clarification. Specifically
>>
>>     <servlet:context mount-path="/mysite"
>> context-path="jar:classpath:/COB-INF/"/>
>>
>> in development mode and this line in production:
>>
>>     <servlet:context mount-path="/mysite"
>> context-path="jar:classpath:lib/${project.build.finalName}.jar!/COB-INF/"/>
>>
>> It will be nice if this is documented with the scenarios where we
>> should use one of another.
>>
>>
>> Thank you.
>>
>>
>>
>>
>> On Sat, Feb 9, 2013 at 7:19 AM, Francesco Chicchiriccò
>> <ilgrosso@apache.org> wrote:
>>> On 09/02/2013 05:09, Mansour Al Akeel wrote:
>>>>
>>>> I am trying to follow this tutorial
>>>> http://cocoon.apache.org/2.2/1291_1_1.html
>>>> to connect 2 blocks. I was able to do this in the past easily with C2.1
>>>> and 2.2.
>>>>
>>>> With C3.0 as soon as I add the depency block to pom.xml I star getting an
>>>> error:
>>>>
>>>> [...]
>>>>
>>>>
>>>>
>>>> I have created the project from maven archetypes. Additionally, when
>>>> following the same tutorial, and I modify the rcl.properties to
>>>> include the classes for the first project, matchers stop matching on
>>>> any patterns.
>>>> Is there something I need to do to get this to work properly ??
>>>
>>>
>>> Hi,
>>> COCOON3-105 changed the way how blocks are deployed in a Cocoon webapp: this
>>> affects only C3 SNAPSHOTS of course, and even in this case you can restore
>>> the old (i.e. 2.2) way of connecting blocks.
>>>
>>> I've prepared a simple C3 project at [1] that shows how to deal with this:
>>> the README there should be enough to get it working and a quick look at
>>> sources can help in understanding what has changed "under the hood".
>>>
>>> More specifically, as you can see from [2], the block mysite2 can refer to
>>> block mysite1's resources as
>>>
>>> <map:read
>>> src="jar:classpath:lib/mysite-${project.version}.jar!/COB-INF/{map:1}.xsl"/>
>>>
>>> where ${project.version} is changed by Maven at build time into the version
>>> declared in pom.xml.
>>>
>>>
>>> We need of course to provide a proper documentation for how to get started
>>> with C3: I've opened COCOON3-119 for this.
>>> Hope this helps, in the meanwhile.
>>>
>>> Regards.
>>>
>>> [1] https://github.com/ilgrosso/cocoon3EmptyProject/tree/COCOON3-105
>>> [2]
>>> https://github.com/ilgrosso/cocoon3EmptyProject/blob/COCOON3-105/mysite2/src/main/resources/COB-INF/sitemap.xmap
>>> [3] http://cocoon.apache.org/2.2/1291_1_1.html
>>>
>>> --
>>> Francesco Chicchiriccò
>>>
>>> ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
>>> http://people.apache.org/~ilgrosso/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>

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


Mime
View raw message