Your problem is that a PofExtractor is an EntryExtractor and requires the whole BinaryEntry entry to be passed to its evaluateEntry method. When you wrap it in a KeyExtractor then the KeyExtractor takes the Key from the entry and passes it to the PofExtractor.evaluate() method - which is not supported. All you need is a PofExtractor without wrapping it in a KeyExtractor. The PofExtractor has another constructor that takes a third parameter that allows you to specify whether its extraction target is the Key or the Value. There are some constants in PofExtractor to do this, PofExtractor.KEY and PofExtractor.VALUE the default with the two parameter constructor is to target PofExtractor.VALUE.
cache.addIndex(new PofExtractor(Long.class, Key.GLOBAL_ID, PofExtractor.KEY), false, null);
Thanks JK. Works Perfectly.