]
Cristiano Nicolai edited comment on ISPN-12730 at 2/17/21 7:50 AM:
-------------------------------------------------------------------
[~gustavonalle] I just run into the exact same problem while trying to migrate Kogito to
version 12.0.1. The only difference is that in our case is an _optional_ type instead of
_repeated_.
see
Cache defnition
{code:xml}
<cache-container statistics="true" shutdown-hook="DEFAULT">
<local-cache name="JOB_DETAILS">
<indexing enabled="true" storage="local-heap">
<indexed-entities>
<indexed-entity>job.service.JobDetails</indexed-entity>
</indexed-entities>
</indexing>
</local-cache>
</cache-container>{code}
was (Author: cnicolai):
[~gustavonalle] I just run into the exact same problem while trying to migrate Kogito to
version 12.0.1. The only difference is that in our case is an _optional_ type instead of
_repeated_.
see
NPE when mapping a repeated non-indexed field in a schema
---------------------------------------------------------
Key: ISPN-12730
URL:
https://issues.redhat.com/browse/ISPN-12730
Project: Infinispan
Issue Type: Bug
Components: Remote Querying
Affects Versions: 12.0.1.Final
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
Priority: Major
Schema:
{code}
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;
}
{code}
Cache Definition:
{code:json}
{
"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"
}
}
}
{code}
The cache creation will throw a NPE:
{noformat}
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)
{noformat}