Hi Mike,
Ok, the only possible place I can see for a NullPointerException is the for loop with this code based on what you have included:
ArrayList<String> al = matmap1.get(coreid[i]); matmap1.remove(coreid[i]); for(int j = 0; j<al.size(); j++) { result.addValue(al.get(j)); }
It looks like you have hard-coded a test key of "A" with an ArrayList of one value. If you test with a payload that includes any material that is not equal to "A" then you will get a NullPointerExeption in the for loop processing. The reason why is that the HashMap will pass back a null value for ArrayList<String> al when the key doesn't exist so you cannot call al.size() on your check condition for a null value. Can you confirm that you are only testing this with a payload materialID of "A" in your sample?
Regards,
Ryan Crosby