Hibernate version: 3.2.ga
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
MySQL 5.0.27
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Dear Team,
I'm new with Hibernate. We have a weird problem: When I test our website locally with Tomcat & MySQL, everything is OK. But after I copy our webapp under Tomcat to remote web hosting, I can only access the JSP pages, not able to access data from database.
The error on page is below,
Data Access Failure
JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.SQLGrammarException: could not insert: [com.cmn.model.User]
I did Google search and someone said the hibernate mapping maybe not good. In my local Tomcat, I can see bunch of *hbm.xml under
work/Catalina/localhost/cmnweb/loader/com/cmn/model/
But I'm not sure the remote Tomcat since it's a shared hosting.
My questions:
1) Any idea about above Hibernate Data Access Failure?
2) How does Tomcat decide to load *hbm.xml from my lib cmnweb-dao.jar, but not all .jar in WEB-INF/lib/ ?
Thanks a lot!
-Bruce
|