You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Leszek Gawron <lg...@mobilebox.pl> on 2007/01/11 23:35:35 UTC

Strange container error

When using a bean defined like this:

> 	<bean name="org.apache.cocoon.generation.Generator/contractors" class="com.mobilebox.smart.generation.ContractorsGenerator" scope="prototype">
>           <property name="contractorService" ref="contractorService"/>
>           <property name="mobileConfigService" ref="mobileConfigService"/>
>           <property name="priceListDefinitionDao" ref="priceListDefinitionDao"/>
> 	</bean>

I get a NPE while referencing priceListDefinitionDao. Some experiments
show that I may also do:

<property name="priceListDefinitionDaoBlahBlah"
ref="priceListDefinitionDao"/>

and spring context configured by cocoon also won't notice. Does anyone
have a clue?

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.

Re: Strange container error

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Leszek Gawron wrote:
> When using a bean defined like this:
> 
>> 	<bean name="org.apache.cocoon.generation.Generator/contractors" class="com.mobilebox.smart.generation.ContractorsGenerator" scope="prototype">
>>           <property name="contractorService" ref="contractorService"/>
>>           <property name="mobileConfigService" ref="mobileConfigService"/>
>>           <property name="priceListDefinitionDao" ref="priceListDefinitionDao"/>
>> 	</bean>
> 
> I get a NPE while referencing priceListDefinitionDao. Some experiments
> show that I may also do:
> 
> <property name="priceListDefinitionDaoBlahBlah"
> ref="priceListDefinitionDao"/>
> 
> and spring context configured by cocoon also won't notice. Does anyone
> have a clue?
> 
I have tried to create beans without cocoon (just startup the context
standalone). When they are not wrapped with PoolableProxyHandler
dependency injection works fine.

I've been trying to make some sense out of PoolableFactoryBean but the
only place it communicates with beanFactory to create pool target is
'this.beanFactory.getBean( this.name )'. The dependency injection should
work fine here.

Please advise.

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.