What ended up happening was that the database field types were not set in the Java classes according to the database types. As it was part of a dependency I had no clue what was going on. So if you have come across this kind of issue, know that there is some error in field type correspondence.