cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: [2.2] Cannot resolve reference to bean SourceResolver in unit test
Date Wed, 11 Feb 2009 10:42:19 GMT
Andreas Hartmann schrieb:
> Hi Cocooners,
> 
> I'm trying to get some tests to run which rely on a components which 
> uses the source resolver.
> 
> The component is declared in lenya-core-ac-components.xml as follows:
> 
>   <bean name="org.apache.lenya.ac.AccessControllerResolver"
>     class="org.apache.lenya.cms.ac.PublicationAccessControllerResolver">
>     <property name="sourceResolver" 
> ref="org.apache.excalibur.source.SourceResolver"/>
>     <property name="repository" 
> ref="org.apache.lenya.cms.publication.Repository"/>
>   </bean>
> 
> In my (TestClassName).spring.xml I reference the bean configuration file 
> like this:
> 
>   <import 
> resource="classpath:META-INF/cocoon/spring/lenya-core-ac-components.xml"/>
> 
> But I get the error
> 
> Cannot resolve reference to bean 
> 'org.apache.excalibur.source.SourceResolver' while setting bean property 
> 'sourceResolver'; nested exception is 
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean 
> named 'org.apache.excalibur.source.SourceResolver' is defined
> 
> 
> Could this be a problem of a missing dependency? The 
> cocoon-template-impl tests seem to rely on components which use the 
> source resolver as well, and I couldn't find a difference in my 
> configuration.

For the record, I "solved" it by adding an .xtest file with the 
declaration of the SourceResolver role and the required source 
factories. Isn't there a non-Avalon way to achieve this?

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message