You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "hgaol (via GitHub)" <gi...@apache.org> on 2023/03/23 17:41:57 UTC

[GitHub] [incubator-eventmesh] hgaol opened a new issue, #3523: [Bug] Json serialization issue when using Redis as storage.

hgaol opened a new issue, #3523:
URL: https://github.com/apache/incubator-eventmesh/issues/3523

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Environment
   
   Mac
   
   ### EventMesh version
   
   master
   
   ### What happened
   
   when I start the TCP demo and set Redis as storage, the runtime throw json parse exception because the body have not been serialized correctly.
   ![image](https://user-images.githubusercontent.com/11908658/226967562-4ccef164-1de9-45a7-a239-c71478e647ac.png)
   
   see data in Redis
   ![image](https://user-images.githubusercontent.com/11908658/226967461-2b2decb3-c633-4934-8487-d8d3048fd746.png)
   
   
   ### How to reproduce
   
   1. set `eventMesh.storage.plugin.type=redis` in runtime config.
   2. add your redis config in `redis-client.properties.
   3. start `runtime` via `org.apache.eventmesh.starter.StartUp`.
   4. start subscribe demo via `org.apache.eventmesh.tcp.demo.sub.eventmeshmessage.AsyncSubscribe`.
   5. start tcp publish demo via `org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublish`.
   6. now the error will occur.
   
   ### Debug logs
   
   Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'testAsyncMessage': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
    at [Source: (byte[])"{"specversion":"1.0","id":"5683320505","source":"/","type":"eventmeshmessage","subject":"TEST-TOPIC-TCP-ASYNC","protocolversion":"1.0","reqeventmesh2mqtimestamp":"1679593289588","propertymessagereplyto":"notnull","reqsendeventmeship":"[fe80:0:0:0:aede:48ff:fe00:1122%en5]","replyto":"localhost@ProducerGroup-producerPool-9-access#V1_4_0#CI","protocoldesc":"tcp","protocoltype":"eventmeshmessage","ttl":"30000","reqc2eventmeshtimestamp":"1679593289587","data":testAsyncMessage}"; line: 1, column: 477]
   Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'testAsyncMessage': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
   
   	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:2391) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:745) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3634) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3607) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._matchToken2(UTF8StreamJsonParser.java:2948) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._matchTrue(UTF8StreamJsonParser.java:2882) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextFieldName(UTF8StreamJsonParser.java:1115) ~[jackson-core-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.deser.std.BaseNodeDeserializer._deserializeContainerNoRecursion(JsonNodeDeserializer.java:440) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer$ObjectDeserializer.deserialize(JsonNodeDeserializer.java:122) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.deser.std.JsonNodeDeserializer$ObjectDeserializer.deserialize(JsonNodeDeserializer.java:105) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.DeserializationContext.readValue(DeserializationContext.java:966) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.DeserializationContext.readValue(DeserializationContext.java:953) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at io.cloudevents.jackson.CloudEventDeserializer.deserialize(CloudEventDeserializer.java:201) ~[cloudevents-json-jackson-2.2.0.jar:?]
   	at io.cloudevents.jackson.CloudEventDeserializer.deserialize(CloudEventDeserializer.java:40) ~[cloudevents-json-jackson-2.2.0.jar:?]
   	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4675) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3691) ~[jackson-databind-2.13.0.jar:2.13.0]
   	at io.cloudevents.jackson.JsonFormat.deserialize(JsonFormat.java:99) ~[cloudevents-json-jackson-2.2.0.jar:?]
   	at org.apache.eventmesh.storage.redis.cloudevent.CloudEventCodec.lambda$static$1(CloudEventCodec.java:48) ~[eventmesh-storage-redis-1.8.0-release.jar:1.8.0-release]
   	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:383) ~[redisson-3.17.3.jar:3.17.3]
   	at org.redisson.client.handler.CommandDecoder.decodeList(CommandDecoder.java:427) ~[redisson-3.17.3.jar:3.17.3]
   	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:392) ~[redisson-3.17.3.jar:3.17.3]
   	at org.redisson.client.handler.CommandPubSubDecoder.decodeCommand(CommandPubSubDecoder.java:86) ~[redisson-3.17.3.jar:3.17.3]
   	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:137) ~[redisson-3.17.3.jar:3.17.3]
   	at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:94) ~[redisson-3.17.3.jar:3.17.3]
   	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510) ~[netty-codec-4.1.79.Final.jar:4.1.79.Final]
   	at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366) ~[netty-codec-4.1.79.Final.jar:4.1.79.Final]
   	... 17 more
   
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org


[GitHub] [eventmesh] mytang0 closed issue #3523: [Bug] Json serialization issue when using Redis as storage.

Posted by "mytang0 (via GitHub)" <gi...@apache.org>.
mytang0 closed issue #3523: [Bug] Json serialization issue when using Redis as storage.
URL: https://github.com/apache/eventmesh/issues/3523


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org