By Tanvir Shuvo
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(FrameworkServlet.java:965) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) javax.servlet.http.HttpServlet.service(HttpServlet.java:620) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
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!
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!
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!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.