Thank Chris for help. I have questions embedded below. > Data Access Failure JDBC exception on Hibernate data access; nested > exception is org.hibernate.exception .SQLGrammarException: could not > insert: [com.cmn.model.User]
Can you post more of this stack trace? I wonder if the real problem is "cannot connect to database", and not "SQL syntax error", as suggested by the exception class. [Mike] It's a shared web hosting, thus I cannot see the whole stack trace. If it's a "cannot connect to database" problem, which file or settings do you suggest to look at? Can you verify that you can reach the hibernate database from your app server? There may be a firewall or other barrier between the two machines. [Mike] The Tomcat and MySQL run on same machine. Can you suggest an easy sample code to verify the connection between both? Thanks! -Mike Christopher Schultz <[EMAIL PROTECTED]> wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike, Mike LI wrote: > Data Access Failure JDBC exception on Hibernate data access; nested > exception is org.hibernate.exception .SQLGrammarException: could not > insert: [com.cmn.model.User] Can you post more of this stack trace? I wonder if the real problem is "cannot connect to database", and not "SQL syntax error", as suggested by the exception class. Can you verify that you can reach the hibernate database from your app server? There may be a firewall or other barrier between the two machines. > 2) How does Tomcat decide to load *hbm.xml from my lib > cmnweb-dao.jar, but not all .jar in WEB-INF/lib/ ? Tomcat "loads" JAR files whenever a class is requested that resides in the JAR file. They might not all be processed at once. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHIi/a9CaO5/Lv0PARAtedAJ0bKrCMSazZTalpfmH145kOrwsStACfb2Co OTMS4tdR9ATaX/HeFmPZtss= =3rG9 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com