This happens because you created a cache without a near configuration first 
then tried to create it again with a near config.

for example:
  start a server node
   then do as follows:
        NearCacheConfiguration<Integer, Integer> nearCfg = new
NearCacheConfiguration<>();
        IgniteCache cache1 = ignite.getOrCreateCache("myCache1");
        IgniteCache cache2 = ignite.getOrCreateNearCache("myCache1",
nearCfg);   <-- exception thrown here because you already created this cache

In order to remedy this put the near cache config into the original cache
config.
i.e.
        CacheConfiguration<Integer, Integer> cfg = new
CacheConfiguration<>("myCache1");
        NearCacheConfiguration<Integer, Integer> nearCfg = new
NearCacheConfiguration<>();
        cfg.setNearConfiguration(nearCfg);
        IgniteCache cache1 = ignite.getOrCreateCache(cfg);



more info: https://www.gridgain.com/docs/latest/developers-guide/near-cache

Thanks, Alex





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to