This problem occured for me when I was coding in a test and production environment with the mysql database named different in each ('userstest' in test environment, 'usersprod' in production.)
When generating the hibernate code, it hardcoded the catalog into Java objects like:
Code:
@Table(name = "users", catalog = "userstest")
So, when deploying to production, hibernate was looking for the table in 'userstest' database which didn't exist.
The quick fix was just to name all the databases the same across the different environments, then regenerate the hibernate java objects to use the proper database name.