cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Poetz <>
Subject Re: [C2.2]: Forms block
Date Sun, 17 Feb 2008 12:53:31 GMT
Andre Juffer wrote:
> More questions about blocks, in particular the forms block.
> I am trying to get a form going that worked very fine with C2.1, 
> according to the migration guide at 
> The first step required a change in 
> src/main/resources/META-INF/cocoon/spring/servlet-service.xml
> which currently now looks exactly like:
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns=""
>   xmlns:xsi=""
>   xmlns:servlet=""
>   xsi:schemaLocation=" 
>   <bean id="com.tribc.sopas.sops.service" 
> class="org.apache.cocoon.sitemap.SitemapServlet">
>     <servlet:context mount-path="/sops" context-path="blockcontext:/sops/">
>       <servlet:connections>
>         <entry key="ajax" value-ref="org.apache.cocoon.ajax.impl.servlet"/>
>         <entry key="forms" 
> value-ref="org.apache.cocoon.forms.impl.servlet"/>
>       </servlet:connections>
>     </servlet:context>
>   </bean>
> </beans>
> So far so good. I made a change in one flow script, adding:
> cocoon.load("servlet:forms:/resource/internal/flow/javascript/Form.js"); 
> and some adjustment in the sitemap, again following the migration 
> guidelines. I have no means to test this all because of the following.
> The addition in servlet-service.xml requires the existence of other 
> beans with refs "org.apache.cocoon.ajax.impl.servlet" and 
> "org.apache.cocoon.forms.impl.servlet". These do not exist and 
> consequently 'mvn jetty:run' utterly fails with the message:
> Caused by: org.springframework.beans.factory.BeanCreationException: 
> Error creating bean with name 'com.tribc.sopas.sops.service': Cannot 
> resolve reference to bean 'org.apache.cocoon.ajax.impl.servlet' while 
> setting bean property 'connections' with key [TypedStringValue: value 
> [ajax], target type [null]]; nested exception is 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
> named 'org.apache.cocoon.ajax.impl.servlet' is defined
> Is it expected that one must include all these beans definitions your 
> self in some application-context.xml? Also, must one include the 
> dependencies on the forms blocks into a pom.xml yourself.

yes, you have to add the forms block as a dependency yourself. Since the forms 
block has a dependency on the ajax block you don't have to add it yourself then. 

> I don't mind to add all of this of course, but this is not very clear 
> from the documentation. It is cumbersome though.

Feel free to add your comments or even better to improve the docs when you think 
that things are unclear or incomplete.

Reinhard Pötz                            Managing Director, {Indoqa} GmbH

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message