fix issue: exception when list instance if java gateway occur exception
fix issue: exception when list instance if java gateway occur exception

fix issue: exception when list instance if java gateway occur exception
add a judgment to return of funciton using javagateway.

nash-x/hws,nash-x/hws