I am having exactly the same problem. Have you managed to solve this one? And how did you do it?
There is the same problem with a bit different words in another thread:
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= seams that the value that comes from mySql is always a long not int.