Hi, Thanks for your reply.
What I can't understand is why it works in some environments, and no others. The war is the same. And why do you say that the "generic type of the idsCommerciaux list is not available at runtime" ? I defined it as a List<Long> in the Action. So Struts should know that it has to convert the data submitted to Long, doesn't it ? Ralf Fischer-2 wrote: > > Hi, > > This seems like a type erasure problem. Reflection is used to set the > entries into the list. As the generic type of the idsCommerciaux list > is not available at runtime the no convertion to Long takes place for > the List elements. So a List containing Strings is injected. Check out > the Collection and Map Support portion from the type conversion > documentation[1]. You might want use an ObjectTypeDeterminer I think. > >> Struts2 version : 2.1.0 > > You should think about upgrading to 2.1.6, as it became GA recently. > > Cheers, > -Ralf > > [1] http://struts.apache.org/2.0.14/docs/type-conversion.html > > > -- View this message in context: http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-Struts-gives-me-String-on-some-servers...-tp21722894p21729390.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org