Changed the pk from java.lang.Integer to java.lang.Long. Everything works fine.
It seems that mysql-get-generated-keys returns a Long and not a Integer.
Not strictly on your point but:
Have you tried to run the 3.2.1 testsuite against the mysql 4.1 ds? I tried this configuration and it fails many of the CMP tests and tests in other suites too.
There are a number of folks on these forums who have had and are having trouble with MySql on 3.2.1.
I can get things to 'work', but whether it is robust and working 'properly', remains at another matter.