Fix compilatiion problem for python/java api, regenerate swig files