4 Replies Latest reply on Sep 28, 2010 11:28 AM by Edouard Boily

    Eviction notification throws a null pointer exception.

    Edouard Boily Newbie
      Eviction notification throws a null pointer exception.
      line 147 of org.infinispan.eviction.EvictionManagerImpl is
      cacheNotifier.notifyCacheEntryEvicted(key, true, null);
      the null third argument causes org.infinispan.notifications.cachelistener.CacheNotifier.notifyCacheEntryEvicted to launch a null exception at line 192.
      The corrected line should be
      cacheNotifier.notifyCacheEntryEvicted(key, true, getInvocationContext());
      In the same way,
      line 157 of org.infinispan.eviction.EvictionManagerImpl is
      cacheNotifier.notifyCacheEntryEvicted(key, false, null);
      and should be
      cacheNotifier.notifyCacheEntryEvicted(key, false, getInvocationContext());
      line 147 of org.infinispan.eviction.EvictionManagerImpl is
      cacheNotifier.notifyCacheEntryEvicted(key, true, null);
      the null third argument causes org.infinispan.notifications.cachelistener.CacheNotifier.notifyCacheEntryEvicted to launch a null exception at line 192.
      I think the corrected line should be
      cacheNotifier.notifyCacheEntryEvicted(key, true, getInvocationContext());
      In the same way,
      line 157 of org.infinispan.eviction.EvictionManagerImpl is
      cacheNotifier.notifyCacheEntryEvicted(key, false, null);
      and should be
      cacheNotifier.notifyCacheEntryEvicted(key, false, getInvocationContext());
      I did the patch on my own instance of infinispan and the solutions seems to work.
      - Edouard