Skip to main content



      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 01:12
Eclipse UserFriend

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:Stuck thread when EJBQueryImpl.getSingleResult
Goto Forum:
  


Current Time: Fri Jul 04 11:20:57 EDT 2025

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

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

Back to the top