It could be that you are using an really old or maybe corrupted version of HSQL db (the built-in db). Mendix 4 wasn't the best in keeping the builtin db in a correct structure.
If you can I'd recommend to just remove the built-in database, by removing your 'deployment' folder, and throwing away the datasnapshot.zip that allows the platform to start from scratch and should generate a new consistent empty db.
If you want to keep the database, you should review the database structure manually and restore any issue that Mx4 may have caused.