]
Tristan Tarrant updated ISPN-9071:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
NullPointerException in server for counters
-------------------------------------------
Key: ISPN-9071
URL:
https://issues.jboss.org/browse/ISPN-9071
Project: Infinispan
Issue Type: Bug
Components: Clustered Counter, Server
Reporter: Pedro Ruivo
Assignee: Pedro Ruivo
Fix For: 9.3.0.Alpha1
In standalone, a NPE is thrown when you invoke any counter operation.
{noformat}
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)
{noformat}
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.