Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Problem while doing Multithreading and using EntityManager(Getting exception while using EntityManager in multiThreaded Environment)
Problem while doing Multithreading and using EntityManager [message #1787417] Fri, 25 May 2018 05:12
Vikas Rathee is currently offline Vikas RatheeFriend
Messages: 1
Registered: May 2018
Junior Member

I am having my application deployed in EJBContainer in glassfish server. I am calling one method using Callable and future in session bean, and in this method i'm using EntityManager for some transaction but getting an NullPointerException for whenever any call to EntityManager is there. Below is the error stack trace::

Severe: java.lang.NullPointerException at com.sun.enterprise.container.common.impl.EntityManagerWrapper.getNonTxEMsFromCurrentInvocation(EntityManagerWrapper.java:276) at com.sun.enterprise.container.common.impl.EntityManagerWrapper.getNonTxEMFromCurrentInvocation(EntityManagerWrapper.java:260) at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:213) at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:455) at LogisticsEngineSessionBean.getAllPackSerialsForProcess(LogisticsEngineSessionBean.java:3137) at LogisticsEngineSessionBean.processSalesOutLines(LogisticsEngineSessionBean.java:3462) at LogisticsEngineSessionBean.lambda$updateSKULocationStatusOnSell$0(LogisticsEngineSessionBean.java:2972) at LogisticsEngineSessionBean$$Lambda$7/1138463255.call(Unknown Source) at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Previous Topic:JPQL queries that worked in 2.6.4 don't work anymore in 2.7.0
Next Topic:Rollback Behaviour When Commit Fails due to no connection
Goto Forum:
  


Current Time: Tue Sep 18 23:48:59 GMT 2018

Powered by FUDForum. Page generated in 0.01785 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top