You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2007/06/22 16:59:03 UTC

[test] Cocoon 2.2-RC1 & others (take 2)

The proposed release artifacts are available at
http://people.apache.org/builds/cocoon/.

Except for the archetypes the easiest way to test the artifacts is by adding a
"cocoon-staging" profile to your ~/.m2/settings.xml:

<settings>
   <profiles>
     <profile>
       <id>cocoon-staging</id>
         <repositories>
           <repository>
             <id>cocoon.staging</id>
             <name>Cocoon staging repository</name>
             <url>http://people.apache.org/builds/cocoon</url>
           </repository>
         </repositories>
         <pluginRepositories>
           <pluginRepository>
             <id>cocoon.staging</id>
             <name>Cocoon staging repository</name>
             <url>http://people.apache.org/builds/cocoon</url>
           </pluginRepository>
         </pluginRepositories>
     </profile>
   </profiles>
</settings>

Then change the version number of the artifacts that you use in your POMs
to the number of the proposed artifact and append "-P cocoon-staging" to all
your Maven commands, e.g.

mvn install -P cocoon-staging

                                       - o -

Because of a bug with the Maven archetyp feature, using profiles doesn't work 
with the Maven archetype goal. In order to test them you can either check them 
out from SVN

http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.2/cocoon-22-archetype-block/cocoon-22-archetype-block-1.0.0-RC1
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.2/cocoon-22-archetype-webapp/cocoon-22-archetype-webapp-1.0.0-RC1
http://svn.apache.org/repos/asf/cocoon/tags/cocoon-2.2/cocoon-22-archetype-block-plain/cocoon-22-archetype-block-plain-1.0.0-RC1

or use the latest version from SVN.

The commands to use the archetypes and explanations of what they are for can be
found at http://cocoon.zones.apache.org/daisy/cdocs/g2/g5/g1/1208.html.

                                       - o -

I also want to draw your attention to
http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g2/1370.html which contains
references to 4 tutorials that help you to get started with Cocoon 2.2 and also
help to test the release artifacts. Again, make sure that you use the
cocoon-staging profile for all your commands as explained above. Otherwise the
referenced artifacts can't be found.

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------

Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by xweber <xw...@googlemail.com>.

Grzegorz Kossakowski-3 wrote:
> 
> src/main/resources/META-INF/cocoon/spring/servlet-service.xml broken:
>   <bean id="com.mycompany.myBlock1.block"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>     <servlet:context mount-path="/myBlock1"
> context-path="blockcontext:/myBlock1/"/>
>       <servlet:connections>
>           <entry key="myBlock2" value-ref="com.mycompany.myBlock2.block"/>
>       </servlet:connections>
>   </bean>
> 
> Notice that servlet:connections is _not_ inside servlet:context tag (it's
> not open at all). It should be:
>   <bean id="com.mycompany.myBlock1.block"
> class="org.apache.cocoon.sitemap.SitemapServlet">
>     <servlet:context mount-path="/myBlock1"
> context-path="blockcontext:/myBlock1/">
>       <servlet:connections>
>           <entry key="myBlock2" value-ref="com.mycompany.myBlock2.block"/>
>       </servlet:connections>
>     </servlet:context>
>   </bean>
> 

Yes and that was the cause!
Its running now - 10k Thanx for that

Alex
-- 
View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11275862
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by xweber <xw...@googlemail.com>.


Grzegorz Kossakowski-3 wrote:
> 
>  It's odd. Can you send us zipped myBlock1 and myBlock2 directories? It
> would allow me to help you effectively.
> 

hi Grzegorz.

Sure. This Nabble Forum do not let me add attachments. I send you a direct
mail via Nabble.

Alex
-- 
View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11274504
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
xweber pisze:
>  Hi Grzegorz,

Hi Alex,

> RCL [create]:
> /home/xweber/tmp/cocoon/test/myBlock1/./target/classes/demo/MyBean.class
> 2007-06-23 23:11:02.460:/:INFO:  Initializing Spring root
> WebApplicationContext
> 2007-06-23 23:11:03.961::WARN:  Failed startup of context
> org.mortbay.jetty.webapp.WebAppContext@1bb9533
> ...
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unable to read spring configurations from classpath*:META-INF/cocoon/spring;
> nested exception is
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Cannot locate BeanDefinitionDecorator for element
> [connections]
> ...
> Caused by:
> org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
> Configuration problem: Cannot locate BeanDefinitionDecorator for element
> [connections]
> 
> on the jetty:run step. So browser says:
> HTTP ERROR: 503
> 
> SERVICE_UNAVAILABLE
> 
> RequestURI=/myBlock1/
> 
> Powered by jetty://
> 
> I even tried it with a clean second dir + attempt to build the steps.

It's odd. Can you send us zipped myBlock1 and myBlock2 directories? It would allow me to help you effectively.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by xweber <xw...@googlemail.com>.
 Hi Grzegorz,


 
> 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."/>
> 	</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.
> 
RCL [create]:
/home/xweber/tmp/cocoon/test/myBlock1/./target/classes/demo/MyBean.class
2007-06-23 23:11:02.460:/:INFO:  Initializing Spring root
WebApplicationContext
2007-06-23 23:11:03.961::WARN:  Failed startup of context
org.mortbay.jetty.webapp.WebAppContext@1bb9533
...
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException:
Unable to read spring configurations from classpath*:META-INF/cocoon/spring;
nested exception is
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionDecorator for element
[connections]
...
Caused by:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
Configuration problem: Cannot locate BeanDefinitionDecorator for element
[connections]

on the jetty:run step. So browser says:
HTTP ERROR: 503

SERVICE_UNAVAILABLE

RequestURI=/myBlock1/

Powered by jetty://

I even tried it with a clean second dir + attempt to build the steps.

Alex
-- 
View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11270315
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
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
> (http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g4/1268.html) 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."/>
	</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:
http://thread.gmane.org/gmane.text.xml.cocoon.devel/73643/focus=73661

Any help will be appreciated, of course.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by xweber <xw...@googlemail.com>.
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
(http://cocoon.zones.apache.org/daisy/cdocs/g1/g1/g4/1268.html) is near
empty. So I cannot figure what part means "component id". I beg your pardon
for this - i am just starting with cocoon.


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.
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.
If you want i can run through all examples in rc1 and give a more complete
list of problems.

Alex
-- 
View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11268794
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
xweber pisze:
> Hi,
> 
> I tried to follow the tutorials with latest rc1 files.
> (http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html)
> 
> On the connecting example (Connect two blocks) I receive an error like
> 
> java.lang.RuntimeException: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@1d5b883
> ..
> Unable to read spring configurations from classpath
> ..
> 
> on mvn jetty:run startup 
> 
> Maybe it is related to the rc1 build.

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.

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).

As regards the fix, do you have a good idea how to make demo beans unique? Do you think that appending block's name (artifact Id) is a good 
idea? Is artifact Id strict enough to not brake name of class?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by xweber <xw...@googlemail.com>.
Hi,

I tried to follow the tutorials with latest rc1 files.
(http://cocoon.zones.apache.org/daisy/cdocs/g2/g2/g1/1291.html)

On the connecting example (Connect two blocks) I receive an error like

java.lang.RuntimeException: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@1d5b883
..
Unable to read spring configurations from classpath
..

on mvn jetty:run startup 

Maybe it is related to the rc1 build.

Alex
-- 
View this message in context: http://www.nabble.com/-test--Cocoon-2.2-RC1---others-%28take-2%29-tf3965214.html#a11267783
Sent from the Cocoon - Dev mailing list archive at Nabble.com.


Re: [test] Cocoon 2.2-RC1 & others (take 2)

Posted by Grzegorz Kossakowski <gk...@apache.org>.
Reinhard Poetz pisze:
> The proposed release artifacts are available at
> http://people.apache.org/builds/cocoon/.
> 
> Except for the archetypes the easiest way to test the artifacts is by 
> adding a
> "cocoon-staging" profile to your ~/.m2/settings.xml:

<snip/>

> Then change the version number of the artifacts that you use in your POMs
> to the number of the proposed artifact and append "-P cocoon-staging" to 
> all
> your Maven commands, e.g.
> 
> mvn install -P cocoon-staging
> 

<snip/>

>                                       - o -
> 
> I also want to draw your attention to
> http://cocoon.zones.apache.org/daisy/cdocs/g2/g1/g2/1370.html which 
> contains
> references to 4 tutorials that help you to get started with Cocoon 2.2 
> and also
> help to test the release artifacts. Again, make sure that you use the
> cocoon-staging profile for all your commands as explained above. 
> Otherwise the
> referenced artifacts can't be found.

Thanks Reinhard for brining this release. I tested it briefly and everything seems to work well. Tested functionality:
1. block archetype
2. cocoon:rcl goal, reloading works very well. I could even create new Spring beans and use them in modified flowscript code.
Great work, really :-)
3. webapp archetype
4. Forms and Templates (using some basic application)

I would like to test database block as well but I don't find any documentation about it.
Does any one know how to configure database block to have HSQL db running, how to create tables and add sample data (so basically, how to 
run SQL statements from file) and how to integrate it with JDBI? Any tips will be appreciated.

I also wonder what is status of documentation? What work is left to be done before we can publish new documentation?

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/