{
String msg = LogUtil.error(PersistenceContextObjectSerializer.class, "Error obtaining persistence context for deserialization of a persistent object of type $0 (id: $1, variable: $2). [{3}]", cls.getName(), id, key, context);
throw new EngineException("ContextDeserialization", msg);
}
Object loaded = pc.findById(id, cls);
if (loaded == null)
{
String msg = LogUtil.error(PersistenceContextObjectSerializer.class, "Persistent object of type $0 not found when deserializing token (id: $1, variable: $2). [{3}]", cls.getName(), id, key, context);
throw new EngineException("ContextDeserialization", msg);
}