cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Property overwriting mechanism
Date Tue, 07 Nov 2006 10:14:29 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I've tested the block archetype (and made it more Spring like).

There seems to be a problem with it!

The
src/main/resources/META-INF/cocoon/spring/demo-application-context.xml
looks like this:

<beans>
        <bean id="demo" class="demo.MyBean" scope="singleton">
                <property name="message" value="This is a message coming from a Spring
bean."/>
        </bean>
</beans>

and I've place a
src/main/resources/META-INF/cocoon/spring/demo-application-context.properties
next to it that looks like this:

demo/message=This is a overwritten message coming from a Spring bean.

I've expected the overwritte message text to appear in the browser but got:

BoundedThreadPool0-1 ERROR cocoon - Internal Cocoon Problem
org.springframework.beans.factory.BeanInitializationException: Could not process key 'demo/message'
in PropertyOverrideConfigurer; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean
 named 'demo' is defined
Caused by:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'demo' is defined
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:355)
        at org.springframework.beans.factory.config.PropertyOverrideConfigurer.applyPropertyValue(PropertyOverrideConfigurer.java:139)
        at org.springframework.beans.factory.config.PropertyOverrideConfigurer.processKey(PropertyOverrideConfigurer.java:127)
        at org.springframework.beans.factory.config.PropertyOverrideConfigurer.processProperties(PropertyOverrideConfigurer.java:99)
        at org.apache.cocoon.core.container.spring.CocoonPropertyOverrideConfigurer.postProcessBeanFactory(CocoonPropertyOverrideConfigurer.java:126)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:416)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:330)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.apache.cocoon.core.container.spring.CocoonWebApplicationContext.<init>(CocoonWebApplicationContext.java:70)
        at org.apache.cocoon.core.container.spring.avalon.SitemapHelper.createContainer(SitemapHelper.java:180)
        at org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.build(SitemapLanguage.java:340)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
        at $Proxy1.build(Unknown Source)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.buildConcreteProcessor(TreeProcessor.java:389)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.setupConcreteProcessor(TreeProcessor.java:323)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:231)
        at org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:368)
        at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:150)
        at org.apache.cocoon.servlet.SitemapServlet.service(SitemapServlet.java:41)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
        at org.apache.cocoon.bootstrap.servlet.ShieldingServlet.service(ShieldingServlet.java:95)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:867)
        at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:104)
        at org.apache.cocoon.bootstrap.servlet.ShieldingServletFilter.doFilter(ShieldingServletFilter.java:50)
        at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:858)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:348)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:195)
        at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:164)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:536)
        at org.mortbay.jetty.Server.handle(Server.java:309)
        at org.mortbay.jetty.Server.handle(Server.java:285)
        at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:364)
        at org.mortbay.jetty.HttpConnection.access$1600(HttpConnection.java:46)
        at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:612)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:485)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:194)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:298)
        at org.mortbay.jetty.nio.SelectChannelConnector$HttpEndPoint.run(SelectChannelConnector.java:710)
        at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412)

Has this ever been tested or am I doing something completely wrong????

Ciao

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFUFyELNdJvZjjVZARAgr3AJ0Y+6KqaoWWBDYH0mKCQIKEuPZw/ACfaMHi
evgkPt47XqUTPhy0zo3eIO4=
=T/9Z
-----END PGP SIGNATURE-----

Mime
View raw message