Issue
I tried to upgrade hibernate from 4 to 5 in my project with spring 4.2
version. After this upgrade, I found the following error in my stack trace when I called a method for updating.
10:53:32,185 ERROR TableStructure:149 - could not read a hi value
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.hibernate_sequence' doesn't exist
I changed the auto incremented Id with annotation
@GeneratedValue(strategy=GenerationType.AUTO)
still the error remains.
Solution
You need to set for Hibernate5.x <property name="hibernate.id.new_generator_mappings">false</property>
.. see and link.
For older version of hibernate 4.x:
<prop key="hibernate.id.new_generator_mappings">false</prop>
Answered By - rParvathi
Answer Checked By - Pedro (JavaFixing Volunteer)