-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate data access SQLGrammarException with web hosting
PostPosted: Fri Oct 26, 2007 1:33 pm 
Newbie

Joined: Fri Oct 26, 2007 1:10 pm
Posts: 3
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.