Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NPE when running entityManager.createQuery

 
Diomar Rockenbach
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a try execute the below code, I'm getting a nullpointer exception.



Error:


I dont have idea why it's happening. I searched on google and found no solution. Below my persistence.xml.



If I uncomment the below line, the error changes to this error:

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing jumps out at me. Has this code worked in the past? IF so, can you rollback your recent changes to see where the error started.
 
Diomar Rockenbach
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry.I've solved this problem and fforgot to update. Just adding this line at persistence.xml. thanks for your help.
<property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform" />
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic