Try setting UseJBossWebLoader=true in
Also, try to remove the hibernate jars from Jboss default library if you are having hibernate jars in ur ear..
Thanks for the idea.
IÂ´m currently using the hibernate jars from the /server/default/lib directory and no further jars are included in my ear.
Unfortunatley the "UseJBossWebLoader" does not have any effect on this.
But maybe this is because it is not an web application, but an ear containing one jar with Entity-classes and one jar with the server-ejb3-sessionbeans.
Any other idea?
It seems as if this class will be loaded only once and the first deployment wins.
In such cases, you will have to load that class again through a separate classloader. Something along these lines:
* Package all the relevant and correct version of hibernate jar files with your application ears. You can place them in EAR/lib folder. Each ear should package these jars.
* Package the hibernate.properties in each EAR. Place that file wherever they are now (at the root of EAR?)
* Configure scoped classloading for each of the EAR through jboss-app.xml. https://www.jboss.org/community/docs/DOC-9288. Ensure that the jboss-app.xml contains a unique loader-repository name for each of the ear.
Thanks for your answer.
It was a little bit circumstantial, as there are some struggles with the current maven ear plugin, but that was finally the solution!!!!
Now it works!! Thanks!