rParvathi rParvathi - 3 months ago 249
Java Question

Hibernate-sequence doesn't exist

I tired to upgrade hibernate from 4 to 5 in my project with spring

4.2
version. After this when I called a method for updating I found the following error in my stack trace.

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.

Answer

You need to set <prop key="hibernate.id.new_generator_mappings">false</prop>.. see link and link.

Comments