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

NullPointerException in server for counters

XMLWordPrintable

      In standalone, a NPE is thrown when you invoke any counter operation.

      ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRod-ServerWorker-5-6) ISPN005023: Exception encoding message EmptyResponse{version=27, messageId=5, cacheName='org.infinispan.COUNTER', clientIntel=3, operation=COUNTER_CREATE, status=OperationNotExecuted, topologyId=-1}: java.lang.NullPointerException
          at org.infinispan.server.hotrod.Encoder2x.writeHeader(Encoder2x.java:62)
          at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.java:70)
      

      In that line, we are trying to get the CacheManager via addressCache, however, the addressCache isn't needed in standalone mode and it is null.
      We should get the CacheManager from the HotRodServer instance.

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: