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

REST /v2/caches always returns 500 due to NPE

    XMLWordPrintable

Details

    Description

      Calls to curl -v http://localhost:11223/rest/v2/caches/___script_cache:

      < HTTP/1.1 500 Internal Server Error
      < content-length: 228
      < 
      * Connection #0 to host localhost left intact
      Cannot invoke "org.infinispan.query.core.stats.impl.SearchStatsRetriever.getSearchStatistics()" because the return value of "org.infinispan.query.impl.ComponentRegistryUtils.getSearchStatsRetriever(org.infinispan.Cache)" is null% 
      

      Server logs

      09:18:57,165 ERROR (blocking-thread--p3-t1) [org.infinispan.rest.RestRequestHandler] ISPN012005: An error occurred while responding to the client java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot invoke "org.infinispan.query.core.stats.impl.SearchStatsRetriever.getSearchStatistics()" because the return value of "org.infinispan.query.impl.ComponentRegistryUtils.getSearchStatsRetriever(org.infinispan.Cache)" 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 invoke "org.infinispan.query.core.stats.impl.SearchStatsRetriever.getSearchStatistics()" because the return value of "org.infinispan.query.impl.ComponentRegistryUtils.getSearchStatsRetriever(org.infinispan.Cache)" is null
      	at org.infinispan.query.Search.getSearchStatistics(Search.java:113)
      	at org.infinispan.rest.resources.CacheResourceV2.getDetailResponse(CacheResourceV2.java:688)
      	at org.infinispan.rest.resources.CacheResourceV2.lambda$getAllDetails$15(CacheResourceV2.java:646)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
      	... 5 more
      
      

      Attachments

        Activity

          People

            fercoli@redhat.com Fabio Massimo Ercoli
            remerson@redhat.com Ryan Emerson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: