Get your CodeRanch badge!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven2 with Spring2.5+Hibernate3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven2 with Spring2.5+Hibernate3" Watch "Maven2 with Spring2.5+Hibernate3" New topic
Author

Maven2 with Spring2.5+Hibernate3

Kerem Yazici
Greenhorn

Joined: Nov 21, 2009
Posts: 5
Hi,

I am trying to implement a project with the frameworks that you can see on the title.
I have two versions of this application, one with ant and one with maven.

When I build my code with ant it works without any problem but when I try to build it with maven it throws me a hibernate exception.

org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:

By googling it I've found that this exception has been thrown due to hibernate can't find the mapping file.

My question is, if hibernate can find the file when I build the project with ant, is there any specific configuration that I need to do when I used hibernate with maven?

For example do I have to specify the class paths somewhere in the pom.

Thank you.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Where did you put your config files? It should go under the resources dir tree.
Kerem Yazici
Greenhorn

Joined: Nov 21, 2009
Posts: 5
David Newton wrote:Where did you put your config files? It should go under the resources dir tree.


Thank you David. It works fine now.
It was in my classpath and I was using


now I changed it to




and it works fine now.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven2 with Spring2.5+Hibernate3
 
Similar Threads
Should i move my builds from ANT to Maven?
Why Maven?
Can some one please explain why do i need MAVEN here
Should I master a build tool?
Maven or Ant?