MySQL tables not found even though they exists and the Spring MVC application is successfully connecting to the database.

I have an Spring MVC application hosted in a tomcat 7 server.

The application is running smoothly. But whenever I go the any page that has a form whose entries are supposed to get persisted in any database table I am getting an error 500. From the stack trace I am pretty sure that the application is connecting to the database successfully. But even though I have all the tables in the specific database in MySQL server the error is saying ‘table not found’.

The exact database and application is running flawlessly in the localhost, but just not in the droplet.

The stack trace:

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet org.springframework.web.servlet.FrameworkServlet.processRequest( org.springframework.web.servlet.FrameworkServlet.doGet( javax.servlet.http.HttpServlet.service( org.springframework.web.servlet.FrameworkServlet.service( javax.servlet.http.HttpServlet.service(

javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'advocatoree.Employee' doesn't exist

Any short of help would be appreciated. Thanks in advance!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I solved the issue by following asb’s suggestion above. I had all of my model class names capitalized. But the database table were not. I was not having any issue because I developed in a windows machine. But, Linux is case sensitive!