Hi!
In your case key and value classes are not deployed on server nodes. You need to deploy classes on all nodes or to use IgniteCache.withKeepBinary. Also you don't need to implement visitUsingMapKeysToNodes methods. You can use IgniteCompute#affinityRun or IgniteCompute#affinityCall methods. They work with custom affinity function correctly.
