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:Rollback Behaviour When Commit Fails due to no connection
Next Topic:Using a @Converter on (nullable) foreign key fields
Goto Forum:
  


Current Time: Wed Oct 23 18:57:29 GMT 2019

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

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

Back to the top