Error ""Exception in processing: NullPointerException" in processor "Centroid Clustering"

Dear experts,

when using the processor “Centroid Clustering”, the error “Exception in processing: NullPointerException” occurs. Can anyone give a hint what the problem could be?


Do you have NULL values in your data? Some of the ‘old’ processors do not handle NULL values automatically and throw exceptions like this if they are in the inputs. Try to remove them first

Thanks for the reply. I do have “0” values but not NULL values. Could “0” values also crash the processor?

Hi Tanja,
I could think of two things that could be the reason for this:

  • Check that the data that goes into the processor has a variance. The processor tacitly standardizes the data, and if all values are (accidentally) the same this causes a division by zero
  • use lower values of maximum K (or K, in case you only use a single one). I remember that this used to cause problems for me in the past if K became larger (as this might result in empty clusters)

Hi Matthias,

thanks for your hints, those were quite helpful! By reducing K, I was able to avoid the error.