Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mappings and POJO's in different folders  RSS feed

 
S Sayer
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my .hbm.xml, .cfg.xml files and my DAO Objects in one folder, and my POJO's located in another folder (different packages, in different eclipse projects--it has to stay this way). When I try and load the data from the database, my .hbm.xml files cannot be located and a MappingException is thrown.
 
karl koch
Ranch Hand
Posts: 388
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put the mapping files on the classpath, that should work.

karl
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!