# Setting custom java object variable in engine api

**URL:** <https://community.ofelia.com/t/setting-custom-java-object-variable-in-engine-api/7778>\
**Category:** Q&A\
**Created:** [15 September 2016 14:35 UTC](https://community.ofelia.com/t/setting-custom-java-object-variable-in-engine-api/7778 "2016-09-15T14:35:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milan.miljkovic](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@milan.miljkovic](https://community.ofelia.com/u/milan.miljkovic)\
**Post date:** [15 September 2016 14:35 UTC](https://community.ofelia.com/t/setting-custom-java-object-variable-in-engine-api/7778/1 "2016-09-15T14:35:57Z")

</div>

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.
