简体   繁体   English

不允许空相关。 也许 CorrelationStrategy 失败了?

[英]Null correlation not allowed. Maybe the CorrelationStrategy is failing?

I am using spring integration,and I am using default correlation strategy, that is i am not explicitly writing code for correlation strategy,everything works fine till the splitter, after the splitter there is a service activator which does some processing and then puts the message into a channel from which the aggregator has to pick it,but the aggregator doesnt pick it, so i put an interceptor to find out what was going on and found out that before the message is put into the aggregator channel, aggregation related headers like correlation id etc are present,but once its put into the channel the headers are lost.Now i am not sure why the aggregator or the channel before that is losing the headers.Any help would be much appreciated.我正在使用 spring 集成,并且我正在使用默认的相关策略,也就是说我没有明确地为相关策略编写代码,在拆分器之前一切正常,在拆分器之后有一个服务激活器进行一些处理,然后放置消息进入聚合器必须从中选择它的通道,但聚合器不选择它,所以我放了一个拦截器来找出发生了什么,并发现在将消息放入聚合器通道之前,聚合相关的标头,如 correlation id 等存在,但一旦将其放入频道,标题就会丢失。现在我不确定为什么聚合器或之前的频道丢失标题。任何帮助将不胜感激。

UPDATE:- i using an spliier then activator then another splitter then an activator then an aggregator and then another aggregator... The code below is for inner splitter and aggregator combination更新:-我使用 spliier 然后是激活器然后是另一个分离器然后是激活器然后是聚合器然后是另一个聚合器......下面的代码用于内部分离器和聚合器组合

Thanks for your help.谢谢你的帮助。 I was able to finally solve this.我终于能够解决这个问题。 The problem was i was passing along org.json.JSONOBject from and to the spring integration components.问题是我在 spring 集成组件之间传递 org.json.JSONOBject。 Now the JSONObject is not serialized, and i guess splitter and aggregator components only work with serialized objects.现在 JSONObject 没有序列化,我猜拆分器和聚合器组件只适用于序列化的对象。 The simplest way was to conver the JSONObjects to string by calling toString() method on them.It would have been so much easier if the stack trace told me that i was using a non-serialized object instead of telling me "Null correlation not allowed. Maybe the CorrelationStrategy is failing?"最简单的方法是通过对它们调用 toString() 方法将 JSONObjects 转换为字符串。如果堆栈跟踪告诉我我使用的是非序列化对象而不是告诉我“不允许空关联”,那就简单多了. 也许 CorrelationStrategy 失败了?”

I have removed my code that i had put here to be safe.为了安全起见,我已经删除了我放在这里的代码。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 来源 header 值不允许。 即使允许使用 URL - Origin header value not allowed. Even though URL is allowed Spring-WebSocket-因此不允许访问源“ null” - Spring - WebSocket - Origin 'null' is therefore not allowed access 春季启动错误:“ ID”列错误不允许为NULL - Spring boot error: NULL not allowed for column “ID” error 双向OneToMany和ManyToOne在保存时返回“列不允许使用NULL” - Bidirectional OneToMany and ManyToOne returns “NULL not allowed for column” on save org.h2.jdbc.JdbcSQLException:列“ID”不允许NULL - org.h2.jdbc.JdbcSQLException: NULL not allowed for column “ID” SQL0407:JPA弹簧数据插入操作的列或变量中不允许使用空值 - SQL0407:Null values not allowed in column or variable for JPA spring data insert operation JPA 映射似乎没问题,但 junitTest 仍然给出异常 JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "CART_ID"; - JPA Mapping seem ok but junitTest still give the exception JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "CART_ID"; Spring Boot 升级导致测试失败并出现休眠异常“NULL not allowed for column REV” - Spring boot upgrade causes tests to fail with hibernate exception "NULL not allowed for column REV" 依赖注入正在Mule应用程序启动时工作。 当接收到请求时,对象变为null并通过抛出NullEx失败 - Dependency Injection is working at Mule application startup. Objects are getting null, when a request received and Failing by throwing NullEx 春天kafkatemplate相关ID - spring kafkatemplate correlation id
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM