Looking at the stack trace I think it is failing due to missing data type definition and it assumes Object and that's why it tries to use xstram to build object out of string. So if you declare structureRef for all your itemDefinitions that are used as process variables this error should go away.
HTH