spring集成使用udp消息映射异常

时间:2014-06-03 08:17:35

标签: udp spring-integration

我正在使用udp入站和出站运行spring集成。我收到以下错误,我该如何解决?

13:37:12.346 ERROR [udpIn-ip:udp-inbound-channel-adapter][org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter] Failed to map packet to message 
org.springframework.integration.mapping.MessageMappingException: Incorrect length; expected 1700885373, received 17
    at org.springframework.integration.ip.udp.DatagramPacketMessageMapper.toMessage(DatagramPacketMessageMapper.java:192)
    at org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter$1.run(UnicastReceivingChannelAdapter.java:146)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:1)

您没有显示您的配置,但似乎您已设置check-length="true"。这两方面必须相同(假设您从Spring Integration应用程序发送)。

如果您从其他应用程序接收数据;此属性必须设置为false(默认值)。