Here is what I did. In my har file I have only the hibernate-service.xml file and the maping (*.hbm.xml) files. In my ear file I have the har file, a jar file that contains the data model (all the data classes, the hibernate DAO classes, etc.), the war file, and another jar file that contains the ejb and web service related classes.
I think I did try that approach - how do you specify the har/war deployer to include the jar file with the common classes?
I only thing I can see is that my application.xml file contains:
<application ...> <module> <web> <web-uri>xxxx.war</web-uri> <context-root>xxxx</context-root> </web> </module> <module> <java>xxxx_data.jar</java> </module> <module> <java>xxxx_ejb.jar</java> </module> </application>
and my jboss-ap.xml file contains:
<jboss-app> <module> <har>xxxx_data.har</har> </module> </jboss-app>
There is nothing in the xxxx_data.har file that references the xxxx_data.jar file, though of course the *.hbm.xml files contain entries that reference classes in xxxx_data.jar.
I just now noticed that that xxxx_data.jar file contains a hibernate.cfg.xml file in the base directory. Also, the *.hbm.xml files appear in xxxx_data.jar (so they are in two places).
Hmm - it does'nt work for me.
Did you do any Class-Path references to xxxx_data.jar in your manifest.mf files?
What version of jboss are you running?
I'm running 4.0.4 - is my feeling that the jboss classloader strategy is a moving target valid?
All of my manifest.mf file are plain, no classpaths there.
I have run on 4.0.3SP1 and 4.0.4RC2 (for the later I had to switch back to the axis-based web services as noted in the readme.html). I haven't had the chance to convert my code to the newer JBossWS architecture. (I based my code on the Web Services chapter of JBoss at Work: A Practical Guide by Marrs and Davis.)