I\'m getting this stack trace when I deploy my hibernate app
java.lang.NullPointerException
at org.hibernate.engine.transaction.internal.jta.JtaStatusHel
If you're using Hibernate 4 and trying to create a EntityManagerFactory manually (or SessionFactory) declared as <jta-datasource>, there is a property you must set on your persistence.xml called hibernate.transaction.jta.platform.
For using on JBoss 7
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
I found about this property at Hibernate Docs
Stacktrace clearly indicates that Hibernate cannot join JTA transaction. Moreover, comination of <jta-data-source> and Persistence.createEntityManagerFactory() looks strange - JTA-capable EntityManager is usually created by application server and obtained from it via JNDI.
If you actually want to use resource-local transactions rather than JTA, you need to declare <non-jta-data-source> instead.