Fix an epic bug with java interface in APAM