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

UnsupportedOperationException when querying Cache with json data type

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

XMLWordPrintable

      While migrating Kogito from using Infinispan 11.0.4 to version 12.0.2 I run in the following issue when executing Queries:

       

      12:23:45,512 DEBUG (blocking-thread--p3-t1) [org.infinispan.query.remote.impl.QueryFacadeImpl] Error executing remote query : null java.lang.UnsupportedOperationException
      	at org.infinispan.commons.dataconversion.internal.Json.asJsonList(Json.java:1912)
      	at org.infinispan.query.remote.client.impl.QueryRequest.fromJson(QueryRequest.java:93)
      	at org.infinispan.query.remote.impl.JsonQuerySerializer.decodeQueryRequest(JsonQuerySerializer.java:35)
      	at org.infinispan.query.remote.impl.BaseRemoteQueryManager.decodeQueryRequest(BaseRemoteQueryManager.java:80)
      	at org.infinispan.query.remote.impl.QueryFacadeImpl.query(QueryFacadeImpl.java:38)
      	at org.infinispan.server.hotrod.HotRodServer.query(HotRodServer.java:141)
      	at org.infinispan.server.hotrod.CacheRequestProcessor.queryInternal(CacheRequestProcessor.java:545)
      	at org.infinispan.server.hotrod.CacheRequestProcessor.lambda$query$20(CacheRequestProcessor.java:540)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      The JSON that is received in the server is the following:

       

      {"queryString":"from org.acme.travels.travels.Travels","startOffset":null,"maxResults":null,"namedParameters":null}
      

      Which seems to be the root cause as namedParameters is null.

       

      cache config:

      <infinispan>
        <cache-container shutdown-hook="DEFAULT">
          <local-cache name="processinstances">
            <indexing storage="local-heap">
              <indexed-entities>
                <indexed-entity>org.kie.kogito.index.model.KogitoMetadata</indexed-entity>
                <indexed-entity>org.kie.kogito.index.model.ProcessInstanceMeta</indexed-entity>
                <indexed-entity>org.kie.kogito.index.model.UserTaskInstanceMeta</indexed-entity>
                <indexed-entity>org.acme.travels.travels.Travels</indexed-entity>
              </indexed-entities>
            </indexing>
          </local-cache>
        </cache-container>
      </infinispan>
      

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

                Created:
                Updated:
                Resolved:
                Archived: