Setting custom java object variable in engine api

Hi,
I have a problem in initializing custom java object variable in engine api. Steps that I’ve done are:

  1. Made a new class in eclipse which implements Serializable
  2. Added custom jar which includes this class in bonita studio
  3. Configured this jar as a process dependency
  4. Created new pool variable of this class type
    When I try to assign value to this variable in java code I receive following exception:
    com.thoughtworks.xstream.converters.ConversionException: com.asseco.bpm.loan.model.Customer : com.asseco.bpm.loan.model.Customer
    ---- Debugging information ----
    message : com.asseco.bpm.loan.model.Customer
    cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
    cause-message : com.asseco.bpm.loan.model.Customer
    class : java.util.HashMap
    required-type : java.util.HashMap
    converter-type : com.thoughtworks.xstream.converters.collections.MapConverter
    path : /object-array/map/entry[2]/com.asseco.bpm.loan.model.Customer
    line number : 50
    class[1] : [Ljava.lang.Object;
    converter-type[1] : com.thoughtworks.xstream.converters.collections.ArrayConverter
    version : null

Any help would be highly appreciated.