Ok, I found the problem. CacheConfiguration.setIndexTypes(a1,a2,...) requires pairs of type key.class and value.class. I used String.class for key while I should have been using AffinityKey.class.
-- Sent from: http://apache-ignite-users.70518.x6.nabble.com/