Investigated also in MySQL, HSQLDB and with hibernate 5.0.3.Final. See attached file for exception stack trace. To be exact it fails in applyForeignKeys and in my case it has problem with self referenced entity (self join attribute in the entity).