when i use to send object to mina endpoint i get error even if iconvert body to type of object
this is the code: /***********TCP client********/ package com.fusesource.fusebyexample; import java.io.*; import java.net.*; class TCPClient{ public static void main(String argv[]) throws Exception{ boolean clientUp = true; Socket s = new Socket("localhost",8888); OutputStream os = s.getOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(os); Obj to = new Obj(1,"object from client"); oos.writeObject(to); } } /*********route**********/ <camelContext xmlns="http://camel.apache.org/schema/spring"> <package>com.fusesource.fusebyexample</package> <route id="MinaSample"> <description>Mina Sample Combining Spring DSL and Spring Bean. Tested with a Socket Java Client.</description> <from uri="mina:tcp://localhost:8888?textline=true&sync=false"/> <to uri="file://src/data"/> <log loggingLevel="INFO" message="${body}"/> </route> </camelContext> /*****object*****/ package com.fusesource.fusebyexample; import java.io.Serializable; public class Obj implements Serializable { int id; String name; public Obj(){} public Obj(int id, String name) { super(); this.id = id; this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; }} /************console**********/ [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building A Camel Route 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ MinaSample --- [INFO] Deleting C:\Users\takidean\Desktop\aa\MinaSample-master\target [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ MinaSample --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ MinaSample --- [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 3 source files to C:\Users\takidean\Desktop\aa\MinaSample-master\target\classes [INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ MinaSample --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\takidean\Desktop\aa\MinaSample-master\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ MinaSample --- [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! [INFO] Compiling 2 source files to C:\Users\takidean\Desktop\aa\MinaSample-master\target\test-classes [INFO] [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ MinaSample --- [INFO] Surefire report directory: C:\Users\takidean\Desktop\aa\MinaSample-master\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ MinaSample --- [INFO] Building jar: C:\Users\takidean\Desktop\aa\MinaSample-master\target\MinaSample-0.0.1-SNAPSHOT.jar [INFO] [INFO] >>> camel-maven-plugin:2.7.1-fuse-00-43:run (default-cli) @ MinaSample >>> [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ MinaSample --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 2 resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ MinaSample --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ MinaSample --- [debug] execute contextualize [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\Users\takidean\Desktop\aa\MinaSample-master\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ MinaSample --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< camel-maven-plugin:2.7.1-fuse-00-43:run (default-cli) @ MinaSample <<< [INFO] [INFO] --- camel-maven-plugin:2.7.1-fuse-00-43:run (default-cli) @ MinaSample --- [INFO] Classpath = [file:/C:/Users/takidean/Desktop/aa/MinaSample-master/target/classes/, file:/C:/Users/takidean/.m2/repository/org/apache/camel/camel-core/2.7.1-fuse-00-43/camel-core-2.7.1-fuse-00-43.jar, file:/C:/Users/takidean/.m2/repository/org/slf4j/slf4j-api/1.5.11/slf4j-api-1.5.11.jar, file:/C:/Users/takidean/.m2/repository/org/fusesource/commonman/commons-management/1.0/commons-management-1.0.jar, file:/C:/Users/takidean/.m2/repository/org/apache/camel/camel-spring/2.7.1-fuse-00-43/camel-spring-2.7.1-fuse-00-43.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-context/3.0.5.RELEASE/spring-context-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-beans/3.0.5.RELEASE/spring-beans-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-core/3.0.5.RELEASE/spring-core-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-expression/3.0.5.RELEASE/spring-expression-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-asm/3.0.5.RELEASE/spring-asm-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-aop/3.0.5.RELEASE/spring-aop-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/C:/Users/takidean/.m2/repository/org/springframework/spring-tx/3.0.5.RELEASE/spring-tx-3.0.5.RELEASE.jar, file:/C:/Users/takidean/.m2/repository/org/slf4j/slf4j-log4j12/1.5.11/slf4j-log4j12-1.5.11.jar, file:/C:/Users/takidean/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar, file:/C:/Users/takidean/.m2/repository/org/apache/camel/camel-mina/2.7.1-fuse-00-43/camel-mina-2.7.1-fuse-00-43.jar, file:/C:/Users/takidean/.m2/repository/org/apache/mina/mina-core/1.1.7/mina-core-1.1.7.jar] [pache.camel.spring.Main.main()] MainSupport INFO Apache Camel 2.7.1-fuse-00-43 starting [pache.camel.spring.Main.main()] CamelNamespaceHandler INFO OSGi environment not detected. [pache.camel.spring.Main.main()] SpringCamelContext INFO Apache Camel 2.7.1-fuse-00-43 (CamelContext: camel-1) is starting [pache.camel.spring.Main.main()] SpringCamelContext INFO JMX enabled. Using ManagedManagementStrategy. [pache.camel.spring.Main.main()] AnnotationTypeConverterLoader INFO Found 4 packages with 14 @Converter classes to load [pache.camel.spring.Main.main()] DefaultTypeConverter INFO Loaded 153 type converters in 0.921 seconds [pache.camel.spring.Main.main()] MinaConsumer INFO Binding to server address: localhost/127.0.0.1:8888 using acceptor: org.apache.mina.transport.socket.nio.SocketAcceptor@1704ebb [pache.camel.spring.Main.main()] SpringCamelContext INFO Route: MinaSample started and consuming from: Endpoint[mina://tcp://localhost:8888?sync=false&textline=true] [pache.camel.spring.Main.main()] SpringCamelContext INFO Total 1 routes, of which 1 is started. [pache.camel.spring.Main.main()] SpringCamelContext INFO Apache Camel 2.7.1-fuse-00-43 (CamelContext: camel-1) started in 2.056 seconds [-1) thread #3 - MinaThreadPool] MinaConsumer$ReceiveHandler WARN [/127.0.0.1:3904] Unexpected exception from exceptionCaught handler. org.apache.camel.CamelException: java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant at org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:95)[camel-mina-2.7.1-fuse-00-43.jar:2.7.1-fuse-00-43] at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)[mina-core-1.1.7.jar:] at org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)[mina-core-1.1.7.jar:] at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)[mina-core-1.1.7.jar:] at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)[mina-core-1.1.7.jar:] at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)[mina-core-1.1.7.jar:] at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)[mina-core-1.1.7.jar:] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25] at java.lang.Thread.run(Thread.java:662)[:1.6.0_25] -- View this message in context: http://camel.465427.n5.nabble.com/mina-can-t-receive-object-tp5731478.html Sent from the Camel - Users mailing list archive at Nabble.com.