Sorry that I bump up this old thread again, but I have the opposite to this problem. I'm using JBoss 4.0.1SP1 and the Hibernate version that comes with it (2.1.6). I've created a .HAR-file with the following content:
META-INF/MANIFEST.MF
META-INF/hibernate-service.xml
de/poly/databean/persistence/Nutzer.hbm.xml
de/poly/databean/persistence/Nutzer.class
hibernate-service.xml
Code:
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=TestServ">
<depends>jboss.jca:service=RARDeployer</depends>
<attribute name="JndiName">java:/hibernate/TestSession</attribute>
<attribute name="Datasource">java:Wetten</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.MySQLDialect</attribute>
<attribute name="ShowSql">false</attribute>
</mbean>
</server>
When I leave the file like this, the mappings aren't created upon deployment (what they should according to what I've read) which results in "no persister"-errors when trying to use these classes in my code.
When I add the following line
Code:
<attribute name="MapResources">de/poly/databean/persistence/Nutzer.hbm.xml</attribute>
and deploy it, the log shows that the mappings were correctly done and my code also works.
Now out of pure interest:
What may cause this very different behaviour? Was there something changed with Hibernate in 4.0.1SP1?