[Bug] Subscription message serialization issue
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 658
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 52
Description
### Search before asking
- [x] #5209
### Environment
Windows
### EventMesh version
1.10.0
### What happened
2025-09-25 06:50:30,709 ERROR [eventMesh-clientManage-4] HandlerService(HandlerService.java:325) - deserialize json string to typeReference error
org.apache.eventmesh.common.exception.JsonException: deserialize json string to typeReference error
at org.apache.eventmesh.common.utils.JsonUtils.parseTypeReferenceObject(JsonUtils.java:180) ~[eventmesh-common-1.10.0-release.jar:1.10.0-release]
at org.apache.eventmesh.runtime.core.protocol.http.processor.RemoteSubscribeEventProcessor.handler(RemoteSubscribeEventProcessor.java:122) ~[eventmesh-runtime-1.10.0-release.jar:1.10.0-release]
at org.apache.eventmesh.runtime.core.protocol.http.processor.HandlerService$HandlerSpecific.run(HandlerService.java:285) [eventmesh-runtime-1.10.0-release.jar:1.10.0-release]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_342]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_342]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_342]
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList` from String value (token `JsonToken.VALUE_STRING`)
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1]
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1767) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1541) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1488) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:402) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromString(CollectionDeserializer.java:332) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:252) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:30) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4917) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3860) ~[jackson-databind-2.18.0.jar:2.18.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3843) ~[jackson-databind-2.18.0.jar:2.18.0]
at org.apache.eventmesh.common.utils.JsonUtils.parseTypeReferenceObject(JsonUtils.java:178) ~[eventmesh-common-1.10.0-release.jar:1.10.0-release]
... 5 more
2025-09-25 06:50:36,063 INFO [EventMesh-TcpMetricsCalculator-scheduler-1] TcpMetricsCalculator(TcpMetricsCalculator.java:107) - ===================================
### How to reproduce
Subscription message serialization issue
### Debug logs
```Java
```
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [ ] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) *
Contributor guide
Research direction
Start with RemoteSubscribeEventProcessor.handler at line 122 and JsonUtils.parseTypeReferenceObject around lines 178-180, using the reported Jackson MismatchedInputException as the initial symptom. Trace the subscription message serialization and deserialization path and reproduce the failure on Windows with EventMesh 1.10.0. Done means subscription messages deserialize into ArrayList without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100