java - apache mina Custom editor configurer throws exception in spring 4 -



java - apache mina Custom editor configurer throws exception in spring 4 -

i using spring 3 apache mina, , using spring 4 , trying integrate apache mina. when compile, exception in customeditorconfigurer. here bean:

<bean class="org.springframework.beans.factory.config.customeditorconfigurer"> <property name="customeditors"> <map> <entry key="java.net.socketaddress"> <bean class="org.apache.mina.integration.beans.inetsocketaddresseditor" /> </entry> </map> </property> </bean>

as said, throws next error:

cannot convert value of type [org.apache.mina.integration.beans.inetsocketaddresseditor] required type [java.lang.class] property 'customeditors[java.net.socketaddress]': propertyeditor [org.springframework.beans.propertyeditors.classeditor] returned inappropriate value of type [org.apache.mina.integration.beans.inetsocketaddresseditor] caused by: java.lang.illegalargumentexception: cannot convert value of type [org.apache.mina.integration.beans.inetsocketaddresseditor] required type [java.lang.class] property 'customeditors[java.net.socketaddress]': propertyeditor [org.springframework.beans.propertyeditors.classeditor] returned inappropriate value of type [org.apache.mina.integration.beans.inetsocketaddresseditor] @ org.springframework.beans.typeconverterdelegate.convertifnecessary(typeconverterdelegate.java:263) @ org.springframework.beans.typeconverterdelegate.converttotypedmap(typeconverterdelegate.java:623) @ org.springframework.beans.typeconverterdelegate.convertifnecessary(typeconverterdelegate.java:208) @ org.springframework.beans.beanwrapperimpl.convertifnecessary(beanwrapperimpl.java:459)

is problem related newer version of spring?

my maven dependencies following:

<properties> <org.springframework-version>4.0.6.release</org.springframework-version> </properties> <dependency> <groupid>org.apache.mina</groupid> <artifactid>mina-core</artifactid> <version>2.0.4</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-core</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-beans</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-web</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-webmvc</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-messaging</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-websocket</artifactid> <version>${org.springframework-version}</version> </dependency> <dependency> <groupid>com.fasterxml.jackson.core</groupid> <artifactid>jackson-databind</artifactid> <version>2.3.2</version> </dependency> <dependency> <groupid>org.projectreactor</groupid> <artifactid>reactor-net</artifactid> <version>1.1.0.release</version> </dependency>

based on link depends on version of spring. changes may vary different version of spring.

solved issue modifying list.

from:

<entry key = "java.net.socketaddress" > <bean class = "org.apache.mina.integration.beans.inetsocketaddresseditor" /> </ entry>

to:

<entry key = "java.net.socketaddress" value = "org.apache.mina.integration.beans.inetsocketaddresseditor" />

java spring-4 apache-mina

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -