Resolving Hibernate exceptions with MySQL on Linux because of case-sensitive table names

Today I tried to deploy my application from my OSX dev machine to a server on Amazon EC2.

I was running into exceptions like this:

Caused by: org.hibernate.exception.SQLGrammarException: could not load an entity: [app.model.entities.Jobs#8]
at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.loader.Loader.loadEntity(
at org.hibernate.loader.entity.AbstractEntityLoader.load(
at org.hibernate.loader.entity.AbstractEntityLoader.load(
at org.hibernate.persister.entity.AbstractEntityPersister.load(
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(
at org.hibernate.event.def.DefaultLoadEventListener.load(
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(
at org.hibernate.impl.SessionImpl.fireLoad(
at org.hibernate.impl.SessionImpl.load(
at org.hibernate.impl.SessionImpl.load(
at org.springframework.orm.hibernate3.HibernateTemplate$3.doInHibernate(
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(
… 30 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table ‚database.Files‘ doesn’t exist

Although all my table names are lowercase it seems that Hibernate tries to create case-sensitive SQL queries which relate to the name of my POJOs (e.g. MyPojo) .

While this was working on my OSX it didn’t on Fedora Linux on EC2.


In my /etc/my.cnf I had to add the following configuration property:


Thanks to the following articles which helped me:

Dieser Beitrag wurde unter Software-Development abgelegt und mit , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

2 Antworten auf Resolving Hibernate exceptions with MySQL on Linux because of case-sensitive table names

  1. Pingback: jeux casino

  2. Just want to say your article is as astounding. The clarity in your post is simply excellent and i can assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the gratifying work.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *