I have created following simple stream in spring cloud data flow local httpsource | filesink using default properties. I am sending an XML file to httpsource via POST. I am using POSTMAN and doing following settings POST http://144.114.172.3:47783 Body -> form-data Key File of type File and value is chosen XML file contentType : multipart/form-data In file sink I am getting following error
Caused by: org.springframework.core.serializer.support.SerializationFailedException: Unable to deserialize [org.springframework.util.LinkedMultiValueMap] using the contentType [application/x-java-object;type=org.springframework.util.LinkedMultiValueMap] Unable to find class: org.springframework.integration.http.multipart.UploadedMultipartFile; nested exception is com.esotericsoftware.kryo.KryoException: Unable to find class: org.springframework.integration.http.multipart.UploadedMultipartFile at org.springframework.cloud.stream.binder.AbstractBinder.deserializePayload(AbstractBinder.java:265) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] at org.springframework.cloud.stream.binder.AbstractBinder.deserializePayload(AbstractBinder.java:234) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] at org.springframework.cloud.stream.binder.AbstractBinder.deserializePayloadIfNecessary(AbstractBinder.java:213) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] at org.springframework.cloud.stream.binder.AbstractBinder.deserializePayloadIfNecessary(AbstractBinder.java:207) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] at org.springframework.cloud.stream.binder.AbstractMessageChannelBinder$ReceivingHandler.handleRequestMessage(AbstractMessageChannelBinder.java:291) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:109) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] ... 34 common frames omitted Caused by: com.esotericsoftware.kryo.KryoException: Unable to find class: org.springframework.integration.http.multipart.UploadedMultipartFile at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:156) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:133) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:670) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:781) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:134) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.serializers.CollectionSerializer.read(CollectionSerializer.java:40) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:790) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.serializers.MapSerializer.read(MapSerializer.java:161) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.serializers.MapSerializer.read(MapSerializer.java:39) ~[kryo-shaded-3.0.3.jar!/:na] at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:686) ~[kryo-shaded-3.0.3.jar!/:na] at org.springframework.integration.codec.kryo.PojoCodec.doDecode(PojoCodec.java:97) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.integration.codec.kryo.AbstractKryoCodec$3.execute(AbstractKryoCodec.java:96) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at com.esotericsoftware.kryo.pool.KryoPoolQueueImpl.run(KryoPoolQueueImpl.java:61) ~[kryo-shaded-3.0.3.jar!/:na] at org.springframework.integration.codec.kryo.AbstractKryoCodec.decode(AbstractKryoCodec.java:93) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.integration.codec.kryo.AbstractKryoCodec.decode(AbstractKryoCodec.java:79) ~[spring-integration-core-4.3.10.RELEASE.jar!/:4.3.10.RELEASE] at org.springframework.cloud.stream.binder.AbstractBinder.deserializePayload(AbstractBinder.java:260) ~[spring-cloud-stream-1.2.1.RELEASE.jar!/:1.2.1.RELEASE] ... 40 common frames omitted Caused by: java.lang.ClassNotFoundException: org.springframework.integration.http.multipart.UploadedMultipartFile at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_131] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_131] at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94) ~[filesink-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_131] at java.lang.Class.forName0(Native Method) ~[na:1.8.0_131] at java.lang.Class.forName(Unknown Source) ~[na:1.8.0_131] at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:154) ~[kryo-shaded-3.0.3.jar!/:na] ... 55 common frames omitted
Here is how message from source to sink looks like
(Body:'[B@24fcbde5(byte[4784])' MessageProperties [headers={content-length=4858, http_requestMethod=POST, host=144.114.172.3:47783, http_requestUrl=http://144.114.172.3:47783/, connection=keep-alive, cache-control=no-cache, contentType=application/x-java-object;type=org.springframework.util.LinkedMultiValueMap, accept-encoding=gzip, deflate, accept=/, originalContentType=multipart/form-data;boundary=--------------------------512524439543335584289928;charset=UTF-8, user-agent=PostmanRuntime/6.1.6}, timestamp=null, messageId=null, userId=null, receivedUserId=null, appId=null, clusterId=null, type=null, correlationId=null, correlationIdString=null, replyTo=null, contentType=application/x-java-object;type=org.springframework.util.LinkedMultiValueMap, contentEncoding=null, contentLength=0, deliveryMode=null, receivedDeliveryMode=PERSISTENT, expiration=null, priority=0, redelivered=false, receivedExchange=test.idea-httpsource, receivedRoutingKey=test.idea-httpsource, receivedDelay=null, deliveryTag=6, messageCount=0, consumerTag=amq.ctag-IVuCqSrqPF11rqIS4lPoUg, consumerQueue=test.httpsource.test])
What could be going wrong?