Unable to generate token through Java sdk