Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with orm.xml

 
Pramod Kumar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a package structure like this

src/java folder

com.mycompany.myusers.action in this package I have all beans and action classes

src/resources/META-INF/persistance.xml

src/resources/orm.xml


this is my structure and while building the war I am placing the META-INF/persistance.xml in WEB-INF/classes directory and now I need to add orm.xml so in which path should it be place. Is it be placed with persistance.xml or where I need to place this orm.xml to work.

Thanks,
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the hibernate documentation in chapter 2 with regard to the persistence.xml file


mapping-file

The class element specifies a EJB3 compliant XML mapping file that you will map. The file has to be in the classpath. As per the EJB3 specification, Hibernate EntityManager will try to load the mapping file located in the jar file at META_INF/orm.xml. Of course any explicit mapping file will be loaded too. As a matter of fact, you can provides any XML file in the mapping file element ie. either hbm files or EJB3 deployment descriptor.


Mark
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic