cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: [test] Cocoon 2.2-RC1 & others (take 2)
Date Sat, 23 Jun 2007 18:37:15 GMT
xweber pisze:
> Hi Grzegorz,
> Grzegorz Kossakowski wrote:
>> I think you found little trap in our current setup. When two blocks
>> containing demo classes are connected they define exactly the same 
>> Spring component (same package and same component id) twice. In my setup
>> this does not lead to exception, just first Java class and last 
>> declaration of component is used. Try to change a class name/package and
>> Spring Id of the component (don't forget to change in flowscript 
>> too) and everything should be working fine.
>> Please report if it's the case.
> Sure, i would like to test it but unfortunately i have no clue what
> files/lines to change. The doc part for this
> ( is near
> empty. So I cannot figure what part means "component id". I beg your pardon
> for this - i am just starting with cocoon.

Yes, docs needs polishing, I hope we will get more attention on this as soon as RC1 is released
and we are sure that most of the code is stable.

Component (Spring beans) configurations files can be found at src/main/resources/META-INF/cocoon/spring.
Before we change id of spring bean 
to make it unique we have to rename java class as well. Here are instructions (everything
should be done in myBlock2 from the tutorial):
1. Rename Java class demo.myBean to demo.myBean2. The class can be found at src/main/java
2. Open src/main/resources/META-INF/cocoon/spring/demo-application-context.xml for edition
and change following part:
	<bean id="demo2" class="demo.MyBean2" scope="singleton">
		<property name="message" value="This is a message coming from a Spring bean."/>
3. We need to update flowscript code to make it picking up new component. Open src/main/resources/COB-INF/flow/spring-bean.js
and change 
this line:
var demoBean = cocoon.getComponent("demo");
so it looks:
var demoBean = cocoon.getComponent("demo2");

Run jetty:run from myBlock1 and everything (I hope) should be working.

> Grzegorz Kossakowski wrote:
>> I don't think it's show-stopper for release, we just should put an
>> information about work-around in docs and fix it in RC2 that would follow 
>> RC1 quickly (I hope you all remember independent release cycles).
> Yesterday I have run the examples from a svn build. There have been some
> error messages and "dead" pages while clicking through all the links.

Don't hesitate report them. Some of them may be broken because we move samples to new architecture
(servlet-service-fw, docs comming soon).

> Haven't tried if a example webapp build is possible with the "to rc1"
> released files (i am just a beginner with cocoon - so i would need a little
> howto). 
> e.g. in cocoon-validation-sample's sitemap.xmap is a <map:serialize
> type="servletService" "> - count the "
> Maybe it's a wanted syntax error for validation to check something.

No, it's typo, it would be commented that it's broken intentionally. I fixed that, thanks.

> If you want i can run through all examples in rc1 and give a more complete
> list of problems.

AFAIK you can run in rcl only blocks that are already converted to use servlet-service-fw.
If you want to check if it's the case just find 
out if file at src/main/resources/META-INF/cocoon/spring/*blockServlet.xml exists. Some blocks
are not converted yet, see:

Any help will be appreciated, of course.

Grzegorz Kossakowski

View raw message