Have you tried setting this property?
<!-- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>-->
Have you tried setting this property?
<!-- <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>-->
Finally I have succeeded, thanx to Vanger's suggestion for restarting. Maybe it's trivial but may help to someone, so I share it.
Previously I used an EAR and used the enterprise version of the WAR and probably that messed up the libraries.
A. In the WAR file I had change some files:
web.xml:
hibernate.cfg.xml:
Uncomment these lines and change the lookup class to OC4JTransactionManager:
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.OC4JTransactionManagerLookup</property>
B. The libraries have to be provided in the applib folder
C. During deployment you have to map the "user" role to the given Security Providers role.