Uploaded image for project: 'ProtoStream'
  1. ProtoStream
  2. IPROTO-346

Unable to create JSON representation of a Map with non primitive values

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.6.Final
    • None
    • None
    • False
    • False
    • None

      I'm trying to create a reproducer for the following error using a simple entity 

      java.io.IOException: Found tag with invalid wire type : tag=36, wireType=END_GROUP
          at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:142)
          at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:83)
          at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:83)
          at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:57)
          at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:44)
          at org.infinispan.protostream.impl.JsonUtils$2.onEnd(JsonUtils.java:693)
      

      I had no luck. The source code here (https://github.com/pruivo/protostream/commit/c55c3899c320a8055f26a16cd9631559ac557203) only generated the error below.

      Caused by: org.infinispan.protostream.MalformedProtobufException: Found an invalid protobuf tag (1) having a field number smaller than 1
      	at org.infinispan.protostream.impl.TagReaderImpl$Decoder.readTag(TagReaderImpl.java:317)
      	at org.infinispan.protostream.impl.TagReaderImpl.readTag(TagReaderImpl.java:97)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:63)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:83)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:83)
      	at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:57)
      	at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:44)
      	at org.infinispan.protostream.impl.JsonUtils$2.onEnd(JsonUtils.java:693)
      

      Entity

      public class MapOfUUID {
          @ProtoField(value = 1, mapImplementation = HashMap.class)
          public Map<String, UUID> data;
      }
      

              ttarrant@redhat.com Tristan Tarrant
              pruivo@redhat.com Pedro Ruivo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: