Migrating to Hibernate 5: Table ‘crm.hibernate_sequence’ doesn’t exist

I’m doing upgrading Spring 4 to Spring 5 and Hibernate 4 to 5.
My existing functionality refused to work. It broke with the following exception.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘crm.hibernate_sequence’ doesn’t exist

I’m using MariaDB/MySQL. I don’t have to maintain any sequence tables as Oracle. In addition, it was working without any issues. All my primary keys are autogenerated with the following annotations.

private Long id;

Thanks to https://stackoverflow.com/questions/32968527/hibernate-sequence-doesnt-exist

Adding hibernate.id.new_generator_mappings=false to Hibernate properties solved the problem.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s