-
1. Re: NPE when calling createEntityManager
kc7bfi Jan 11, 2012 8:20 PM (in response to kc7bfi)I had to add the following to my persistence.xml file
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
-
2. Re: NPE when calling createEntityManager
kc7bfi Jan 11, 2012 8:34 PM (in response to kc7bfi)I had to add the following to my persistence.xml file
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
-
3. Re: NPE when calling createEntityManager
koncinar Oct 3, 2012 5:04 AM (in response to kc7bfi)Thank you for this post - it helped me solve my similar problem.
I was trying to deploy the application on Weblogic 12g with Hibernate as data source provider:
<provider>org.hibernate.ejb.HibernatePersistence</provider>
I was getting the following error while injecting persistence context into an EJB:
Caused By: java.lang.NullPointerException
at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus(JtaStatusHelper.java:73)
at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.isActive(JtaStatusHelper.java:115)
at org.hibernate.engine.transaction.internal.jta.CMTTransaction.join(CMTTransaction.java:149)
at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1220)
at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:178)
Truncated. see log file for complete stacktrace
The sollution was to add
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform"/>
into persistence.xml.
-
4. Re: NPE when calling createEntityManager
mthigale Jul 29, 2013 12:09 AM (in response to koncinar)Thanks a lot ! This worked like a charm !
-
5. Re: NPE when calling createEntityManager
rzd Oct 28, 2013 1:30 PM (in response to kc7bfi)This worked for me also. Thanks!
But: Is this a bug in Hibernate? Is there an bug report? Can I keep this outside of my app?
And you should mark this question as answered.
-
6. Re: NPE when calling createEntityManager
aiellomau Dec 2, 2013 1:40 PM (in response to kc7bfi)The issue with OpenJPA.
I added this line on my persistence.xml and works.
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform" />
Do I need to report as a bg of Jboss As 7.1.1 ???
Thanks David for this workaround.
-
7. Re: NPE when calling createEntityManager
tavleen Aug 9, 2016 7:16 AM (in response to kc7bfi)I know this is an old post .... but Thanks a lot David
I spent two days on it and finally this page helped...