Using Hibernate 2.1.2, I'm placing the JCA connector in my EAR to deploy into BEA Weblogic 8.1 SP2.
I have an EAR with hibernate as a connector module. In the ra.xml, I set the MapResources to:
mappings/com/a/MyClass.hbm.xml
My problem is where exactly to put that file in my EAR. I've tried every place I can think of. I thought it would look up the mapping file from your classpath , but this is not working.
I tried putting a jar containing the mapping file (and its containing directories) under /APP-INF/lib (BEA auto-loads jars here)
I tried putting a jar (and also an expanded jar) under /APP-INF/classes (BEA auto-loads classes here)
I tried putting the mappings under my hibernate RAR module directory (e.g. /hibernate/mappings...
I get the error:
SEVERE: Cannot create Hibernate session factory
net.sf.hibernate.MappingException: Resource: mappings/com/a/MyClass.hbm.xml not found
...
If I put the mappings JAR'd into my system classpath, then it finds the mapping there. However, this is obviously not acceptable.
Am I missing something here, does Hibernate really just not work with BEA Weblogic 8.1 SP 2, or what?
Thanks for any help.
|