Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12730

NPE when mapping a repeated non-indexed field in a schema

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

XMLWordPrintable

      Schema:

      package com.redhat;
      
      message Attack {
         optional string type = 1;
      }
      
      /**
       * @Indexed
       */
      message ConnectedPlayer {
      
         optional string uuid = 1;
      
         optional string userName = 2;
      
         optional string match = 3;
      
         repeated Attack attacks = 4;
      
         /**
          * @Field(index=Index.YES, analyze = Analyze.NO, store = Store.NO)
          */
         optional int32 score = 5;
      
         optional int64 timestamp = 6;
      }
      
      

      Cache Definition:

      {
        "distributed-cache": {
          "mode": "SYNC",
          "encoding": {
            "key": {
              "media-type": "application/x-protostream"
            },
            "value": {
              "media-type": "application/x-protostream"
            }
          },
          "indexing": {
            "enabled":true,
            "indexed-entities" : ["com.redhat.ConnectedPlayer"]
          },
          "transaction": {
            "mode": "NON_XA"
          },
          "memory": {
            "storage": "HEAP"
          }
        }
      }
      

      The cache creation will throw a NPE:

      08:25:43,520 ERROR (blocking-thread--p3-t4) [org.hibernate.search.engine.reporting.spi.RootFailureCollector] HSEARCH000521: Hibernate Search encountered a failure during bootstrap; continuing for now to list all problems, but the process will ultimately be aborted.
      Context: Infinispan Search Mapping, type 'com.redhat.ConnectedPlayer ([B)'
      Failure: java.lang.NullPointerException
      	at org.infinispan.query.remote.impl.mapping.typebridge.ProtobufMessageBinder$State.bind(ProtobufMessageBinder.java:92)
      	at org.infinispan.query.remote.impl.mapping.typebridge.ProtobufMessageBinder.createIndexReferenceProvider(ProtobufMessageBinder.java:49)
      	at org.infinispan.query.remote.impl.mapping.typebridge.ProtobufMessageBinder.bind(ProtobufMessageBinder.java:34)
      

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: