The project with problems can be cloned from github: https://github.com/kamiljano/quickquiz.git
when application starts, the database schema gets generated correctly and when you call the url http://localhost:8080/quickquiz-web-1.0-SNAPSHOT/rs/quiz/list (loads all elements from table Quiz with getSession().createCriteria(Quiz.class).list()) everything works fine and entities are loaded correctly, hence I'm assuming my hibernate configuration is correct.
The problems however manifests when trying to persist an entity.
Can be easily presented by requesting http://localhost:8080/quickquiz-web-1.0-SNAPSHOT/rs/quiz/createQuiz
(the code in this case literally doesn't do anything but call the getSession().persist(new Quiz))
The line responsible for persisting the entity throws the following exception:
Apache Maven 3.2.1
Java version: 1.7.0_67, vendor: Oracle Corporation
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
database: MySQL 5
I suspect this may be related to HHH-9446.
What version of Hibernate was being used when you got this stacktrace? If it was 4.3.6 or after, can you try running your application with 4.3.5 an posting your stacktrace?
I originally used version 4.3.8.Final. I found on stackoverflow someone with a problem that appeared to be the same as mine and his solution was to change the hibernate version to 4.3.5 and then I tried all the versions listed in "Affects Version" field and... I didn't notice that in version 4.3.5 I got my exception only in the browser, but not in actual server logs... it turns out that my browser simply cached the page containing the exception... Sorry for the false alarm. Hope you'll fix the bug in the next version of hibernate.
Thanks for the workaround.