Hi Decebal,
ExecutorFilter has no constructor that takes only an Executor
and Spring doesn't understand that it could use this constructor:
public ExecutorFilter(Executor executor, IoEventType... eventTypes)
I will add a constructor that takes only an Executor
Maarten
On 9/13/07, Decebal Suiu <[EMAIL PROTECTED]> wrote:
>
>
> Mina from trunk and Spring 2.0.6
> Config file for spring look like:
>
> <bean id="filterThreadPoolFactory"
> class="org.apache.mina.integration.spring.ThreadPoolExecutorFactoryBean">
> <property name="corePoolSize" value="${corePoolSize}"/>
> <property name="maxPoolSize" value="${maxPoolSize}"/>
> <property name="keepAliveSeconds"
> value="${keepAliveSeconds}"/>
> </bean>
>
> <bean id="filterChainBuilder"
> class="
> org.apache.mina.integration.spring.DefaultIoFilterChainBuilderFactoryBean
> ">
> <property name="filters">
> <list>
> <bean class="
> org.apache.mina.filter.codec.ProtocolCodecFilter">
> <constructor-arg
> ref="protocolCodecFactory"/>
> </bean>
> <bean class="
> org.apache.mina.filter.executor.ExecutorFilter">
> <constructor-arg
> ref="filterThreadPoolFactory"/>
> </bean>
> <bean class="
> org.apache.mina.filter.LoggingFilter"/>
> </list>
> </property>
> </bean>
>
> The error is:
> Caused by:
> org.springframework.beans.factory.UnsatisfiedDependencyException:
> Error creating bean with name
> 'org.apache.mina.filter.executor.ExecutorFilter#5d173' defined in class
> path
> resource [serverContext.xml]: Unsatisfied dependency expressed through
> constructor argument with index 0 of type
> [org.apache.mina.common.IoEventType[]]: Could not convert constructor
> argument value of type [java.util.concurrent.ThreadPoolExecutor] to
> required
> type [[Lorg.apache.mina.common.IoEventType;]: Failed to convert value of
> type [java.util.concurrent.ThreadPoolExecutor] to required type
> [org.apache.mina.common.IoEventType[]]; nested exception is
> java.lang.IllegalArgumentException: Cannot convert value of type
> [java.util.concurrent.ThreadPoolExecutor] to required type
> [org.apache.mina.common.IoEventType] for property 'null': no matching
> editors or conversion strategy found
> at
>
> org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray
> (ConstructorResolver.java:455)
> at
>
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor
> (ConstructorResolver.java:153)
>
>
> Any idea?
>
> Thanks,
> Decebal
> --
> View this message in context:
> http://www.nabble.com/Error-adding-ExecutorFilter-in-Spring-tf4435038s16868.html#a12652766
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com
> .
>
>