0 Replies Latest reply on Jun 13, 2007 7:22 AM by Filippo

    ConversionException on HashMap during Remoting

    Filippo Newbie

      Seam 1.2.1.GA
      win xp

      I get a ConversionException from MapWrapper when calling a @WebRemote method which accepts as parameter a HashMap<String,String>.

      Caused by: org.jboss.seam.remoting.wrapper.ConversionException: Could not create value of type [java.util.LinkedHashMap<
      java.lang.String, java.lang.String>]
       at org.jboss.seam.remoting.wrapper.MapWrapper.convert (MapWrapper.java:101)
       at org.jboss.seam.remoting.wrapper.BeanWrapper.unmarshal(BeanWrapper.java:119)

      I verified that xml produced by client is correct.

      Switching from HashMap<String,String> to Map<String,String> solves the problem.

      Same problem happens when I send to server a seam object which has a Map property and this property is not declared as Map, but HashMap or LinkedHashMap.

      I'm wondering if it's possible to use HashMap with remoting (I haven't found in docs anything against it) or it's simply a bug.