-
Bug
-
Resolution: Done
-
Major
-
None
-
None
There's a race in the PersistenceUnitServiceImpl.stop() as the service is stopped in a thread. The entityManagerFactory is a volatile variable not read into a local variable and may be set to null if stop is invoked twice. The proxyBeanManager should be looked as well.
16:38:59,190 ERROR [org.jboss.as.jpa] (ServerService Thread Pool -- 26) WFLYJPA0007: Failed to stop persistence unit service jpa_classTransformerTestWithMockProvider.ear/ejbjar.jar#mypc: java.lang.NullPointerException at com.sun.proxy.$Proxy101.isOpen(Unknown Source) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:255) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2$1.run(PersistenceUnitServiceImpl.java:236) at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:649) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$2.run(PersistenceUnitServiceImpl.java:281) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485)