Hi,
flatten an incoming json with hierachy works fine, so the fieldmapper can handle hierachy. This is a standard workflow where I use FieldMapper.
I've just tested the other way around and get the same error message you got.
-1 java.lang.ArrayIndexOutOfBoundsException
This looks like the FieldMapper is not initializing the Group before trying to set the value.
I've also tried to create a GeoEvent Definition that contains all source and target fields. In this case i expected that the initialization error does not occur any more. And the error is gone, but the JSON output only contains the top element of the hierachy and not the expected values I set in the FieldMapper.
So i did not find any quick solution.
Edit: You could create a GeoEvent Definition with all fields and use the FieldCalculator to set the value for the fields in hierachy. Not the best solution, cause you Need a FieldCalculator per field, but maybe a Workaround. At the End a FieldReducer to get rid of the flat fields.
Best,
Stefan