cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Apples + spring = cannot find beans (AvalonServiceManager exception)
Date Wed, 06 Sep 2006 18:34:53 GMT
Leszek Gawron wrote:
> Now I am using service-apples which for
> <map:call function="fetchDiscount"/> performs a call
> serviceManager.lookup( "fetchDiscount" )
> Now I see that 'fetchDiscount' bean is shown in cocoon log 
> (pre-instantiating singletons yada yada yada) but I get  the exception 
> anyway:
> Message: Component with 'fetchDiscount' is not defined in this service 
> manager. (Key='AvalonServiceManager')
> A simple test shows that ApplesProcessor is not properly contextualized: 
> If I move the file from 
> COB-INF/config/spring/applicationContext-apples.xml to 
> META-INF/spring/applicationContext-apples.xml (so that this file ends up 
> in WEB-INF/cocoon/spring/) everything starts working just fine.
I guess that this is the typical problem with hierarchical containers.
The apples processor is defined in the root application context and has
no access to any component in a child context. Moving your own
components to WEB-INF/cocoon/spring/ adds them in the root context and
therefore they are visible to apples.

Carsten Ziegeler - Open Source Group, S&N AG

View raw message