• 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
Sheriff
Posts: 36032
432
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" />
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!