but when run program, it throw exception: Expected: class java.lang.Long, got class java.lang.Integer
Using a Long for a BIGINT is correct and the above error suggests that you are somehow passing an Integer where a Long is expected somewhere in your code. Double check your code.