Hi Ben,
I am not sure if you managed to resolve this problem - but I had something similar - I was returning an object rather than an expected string. I believe you maybe be able to use .toString() to "stringify' the object.
Also if the t-sql you are performing is an Update, the pstmt.executeUpdate() is the corresponding call rather than executeQuery() - this was the error I had.
Cheers Paul