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

NullPointerException converting map of string and enum to JSON

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.8.Final
    • None
    • None
    • False
    • False
    • None

      NullPointerException when accessing the console with an object with a Map field of String and Enum.

      I suspect this field [1] because of the method org.infinispan.protostream.descriptors.Type.ordinal().

      [1]
      https://github.com/keycloak/keycloak/blob/18a6c790113998bf039f46d6c71ffb668e961036/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/entities/AuthenticationSessionEntity.java#L46

      06:46:28,997 ERROR (non-blocking-thread--p2-t5) [org.infinispan.rest.stream.CacheChunkedStream] Error encountered while streaming cache chunk java.lang.NullPointerException: Cannot invoke "org.infinispan.protostream.descriptors.Type.ordinal()" because the return value of "org.infinispan.protostream.descriptors.FieldDescriptor.getType()" is null
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:119)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:77)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:91)
      	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:77)
      	at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:58)
      	at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:45)
      	at org.infinispan.protostream.impl.JsonUtils$2.onEnd(JsonUtils.java:785)
      	at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:59)
      	at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:45)
      	at org.infinispan.protostream.impl.JsonUtils.toCanonicalJSON(JsonUtils.java:793)
      	at org.infinispan.protostream.impl.JsonUtils.toCanonicalJSON(JsonUtils.java:496)
      	at org.infinispan.protostream.ProtobufUtil.toCanonicalJSON(ProtobufUtil.java:188)
      	at org.infinispan.protostream.ProtobufUtil.toCanonicalJSON(ProtobufUtil.java:174)
      

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

                Created:
                Updated:
                Resolved:
                Archived: