diff --git a/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java b/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java
index <HASH>..<HASH> 100644
--- a/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java
+++ b/hazelcast/src/main/java/com/hazelcast/cache/impl/AbstractCacheService.java
@@ -330,7 +330,7 @@ public abstract class AbstractCacheService implements ICacheService, PreJoinAwar
             closeSegments(cacheNameWithPrefix);
         }
 
-        final WanReplicationService wanService = nodeEngine.getService(WanReplicationService.SERVICE_NAME);
+        WanReplicationService wanService = nodeEngine.getWanReplicationService();
         wanService.removeWanEventCounters(ICacheService.SERVICE_NAME, cacheNameWithPrefix);
         cacheContexts.remove(cacheNameWithPrefix);
         operationProviderCache.remove(cacheNameWithPrefix);
Acquire WanReplicationService from NodeEngine while deleting cache

The same cache deletion mechanism is used during node shutdown too,
and acquiring `WanReplicationService` can fail in that case.