It's not a secret anymore!*
The moose likes Object Relational Mapping and the fly likes Strange Error when using Hibernate in a web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Strange Error when using Hibernate in a web application" Watch "Strange Error when using Hibernate in a web application" New topic
Author

Strange Error when using Hibernate in a web application

Ainar Martin
Greenhorn

Joined: Mar 22, 2011
Posts: 11
Hello I'm new to Hibernate.

I have generated with Hibernate Tools a database access module. The generator generates the code of the DAOS and Hibernate Beans. When I test this module in a simple Java application all works fine, but when I test
it in a Spring Web application I get a very strange error. Since my module is an independent jar it should access the database without regarding the circumstance of being executed in a simple Java application or a Web application. The code of my web application is:




When running this code on Tomcat I get following error:




When I change some Hibernate dependencies I get following error:



When I test the above code in a simple Java application all works fine.

Is this a spring-hibernate configuration problem?

Thank you for your help.
Ainar Martin
Greenhorn

Joined: Mar 22, 2011
Posts: 11
I have followed the advice posted in the following link but I still get the same error:

http://stackoverflow.com/questions/471799/spring-and-hibernate-cfg-xml

Thank you for your help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Strange Error when using Hibernate in a web application