I have JDBC code which inserts into a database table by executing a PreparedStatement. When I run the code on an in-memory HSQLDB database (as part of a JUnit test) I get a
Systemic issues with HSQLDB are often due to mismatches in server vs. driver version (any mismatch at all will not work in my experience).
I mostly suspect this isn't your issue. Since you said the db is "in memory," I'm guessing the server & driver are the same .jar file. But in case my guess is wrong, I thought I'd throw this out there.