Improving function to get OTT IDs in jython and fixing a bug on casting data before calling the induced tree service.