org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection

Hi,
I’m getting error :
org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
It is a simple java program to add elements to the list. Can anyone tell what changes are to be done?
image
image

So, you don’t actually need to add the Loop Cardinality if you’re sending in a collection, it’ll pick up the size itself.

The Loop Cardinality feild is for cases where you just want to run the loop a specific number of times

1 Like