Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven2 with Spring2.5+Hibernate3

 
Kerem Yazici
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you put your config files? It should go under the resources dir tree.
 
Kerem Yazici
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic