fix java exception