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

Cache details page: Queries give error in case of running after entries expiration

    XMLWordPrintable

Details

    Description

      I create indexed cache where I am putting entries with 40seconds expiration and max-idle time. Before expiration takes place, I am running ickle query and it returns normally result to me.

      Then I wait till entries expire and then run the query again, which returns error (see screenshot), as well as the following exception on server side:

       

      2022-09-07 20:23:15,655 ERROR (blocking-thread-infinispan-4-e2e-p3-t3) [org.infinispan.rest.RestRequestHandler] ISPN012005: An error occurred while responding to the client java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot read the array length because "bytes" is null
          at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
          at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
          at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
          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:833)
      Caused by: java.lang.NullPointerException: Cannot read the array length because "bytes" is null
          at org.infinispan.protostream.impl.JsonUtils.toCanonicalJSON(JsonUtils.java:469)
          at org.infinispan.protostream.impl.JsonUtils.toCanonicalJSON(JsonUtils.java:464)
          at org.infinispan.protostream.ProtobufUtil.toCanonicalJSON(ProtobufUtil.java:189)
          at org.infinispan.protostream.ProtobufUtil.toCanonicalJSON(ProtobufUtil.java:175)
          at org.infinispan.encoding.ProtostreamTranscoder.toJsonCascading(ProtostreamTranscoder.java:174)
          at org.infinispan.encoding.ProtostreamTranscoder.doTranscode(ProtostreamTranscoder.java:92)
          at org.infinispan.commons.dataconversion.AbstractTranscoder.transcode(AbstractTranscoder.java:69)
          at org.infinispan.query.remote.impl.JsonQuerySerializer.lambda$createQueryResponse$0(JsonQuerySerializer.java:45)
          at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
          at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
          at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
          at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
          at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
          at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
          at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
          at org.infinispan.query.remote.impl.JsonQuerySerializer.createQueryResponse(JsonQuerySerializer.java:46)
          at org.infinispan.query.remote.impl.JsonQuerySerializer.createQueryResponse(JsonQuerySerializer.java:23)
          at org.infinispan.query.remote.impl.BaseRemoteQueryManager.executeQuery(BaseRemoteQueryManager.java:65)
          at org.infinispan.rest.resources.CacheResourceQueryAction.lambda$search$0(CacheResourceQueryAction.java:71)
          at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
          ... 5 more

       

       

       After that I again run the query but already receive normal `No values found` screen.

       

      NOTE: exception is not thrown if I enter the values and wait till they expire without running the query.  I run query after the entries are expired and get normal `No values found` message. Also exception is not thrown if the first query (before entries expiration) returns also values which doesn't have expiration timeout. In that case, after my entered entries are expired, the query normally returns the remaining values.

      I think this is an issue on Server side, console only shows what it gets from the server, but I have found it through the console. 

      Attachments

        Activity

          People

            fercoli@redhat.com Fabio Massimo Ercoli
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: