cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perez Guerrero, Antonio Javier" <AJPE...@sadiel.es>
Subject [2.2] No bean named org.apache.cocoon.servletservice.spring.BlockServletMap is defined
Date Wed, 01 Oct 2008 15:23:59 GMT
Hi,

I'm trying to migrate a Cocoon 2.1 webapp into 2.2.

I created a webapp from archetype and modified it following the "Cocoon
2.2 without tears" guide [1]. With that, I was able to run a simple 2.2
webapp with just one page. Then, I merged it with my old Cocoon 2.1
blockless webapp. For the cocoon.xconf, core.xml and core.properties
I've taken these from the "Cocoon Classic 2.2" source code [2], and
adapted them. The server (Tomcat 5.0.28) starts up without problems, but
when I try to access any page (i.e. localhost:8080/mywebapp/), I get
this:

HTTP 500 Error:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'org.apache.cocoon.servletservice.spring.BlockServletMap' is
defined
org.springframework.beans.factory.support.DefaultListableBeanFactory.get
BeanDefinition(DefaultListableBeanFactory.java:378)
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedL
ocalBeanDefinition(AbstractBeanFactory.java:1012)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:227)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(Ab
stractBeanFactory.java:164)
org.springframework.context.support.AbstractApplicationContext.getBean(A
bstractApplicationContext.java:888)
org.apache.cocoon.servletservice.DispatcherServlet.getBlockServletMap(Di
spatcherServlet.java:138)
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherSer
vlet.java:68)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


Why does the DispatcherServlet try to load something called
"BlockServletMap"? It's not defined anywhere in my webapp (should it?).
What am I doing wrong? Or what am I missing? Any ideas?

Thanks in advance...


[1]: Cocoon 2.2 without tears:
http://www.csparks.com/cocoon/c22without/index.xhtml
[2]: Cocoon Classic 2.2 source:
http://reverycodes.com/gt/MyCocoonWebapp.zip


P.S.: these are my web.xml and applicationContext.xml:


<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<!-- Declare Spring context listener which sets up the Spring
Application Context containing all Cocoon components (and user defined
beans as well) -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</l
istener-class>
</listener>
	
<!-- Declare Spring request listener which sets up the required
RequestAttributes to support Springs and Cocoon custom bean scopes like
the request scope or the session scope -->
<listener>
<listener-class>org.springframework.web.context.request.RequestContextLi
stener</listener-class>
</listener>
	
<!-- Declare a context listener that installs all blocks -->
<listener>
<listener-class>org.apache.cocoon.blockdeployment.BlockDeploymentServlet
ContextListener</listener-class>
</listener>

<servlet>
	<description>Cocoon blocks dispatcher</description>
	<display-name>DispatcherServlet</display-name>
	<servlet-name>DispatcherServlet</servlet-name>
	
<servlet-class>org.apache.cocoon.servletservice.DispatcherServlet</servl
et-class>
	<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
	<servlet-name>DispatcherServlet</servlet-name>
	<url-pattern>/*</url-pattern>
</servlet-mapping>

</web-app>



<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:servlet="http://cocoon.apache.org/schema/servlet"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://cocoon.apache.org/schema/servlet
http://cocoon.apache.org/schema/servlet/cocoon-servlet-1.0.xsd">

<import resource="cocoon/spring/core.xml"/>

<bean id="myCompany.myWebapp"
class="org.apache.cocoon.sitemap.SitemapServlet">
	<servlet:context mount-path=""
context-path="file:///${path-to-my-webapp-root}"/>
</bean> 
</beans>


Mime
View raw message