Whenever I try to set a list as a parameter for use in an IN expression I get an Illegal argument exception. Various posts on the internet seem to indicate that this is poss
Hope this helps some one. I have faced the issue and did the following to resolve (using eclipselink 2.2.0)
I had JavaEE jar as well as jpa 2 jar(javax.persistence*2*) in the class path. Removed the JavaEE from the class path.
I was using something like " idItm IN ( :itemIds ) " which was throwing the exception :
type class java.util.ArrayList for parameter itemIds with expected type of class java.lang.String from query string
Solution: I just changed the in condition to " idItm IN :itemIds ", i.e. I removed the brackets ().