ClassCastException when used in conjonction with cloudbees folders plugin