You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Leon (JIRA)" <ji...@apache.org> on 2014/04/30 06:41:14 UTC
[jira] [Created] (OFBIZ-5625) NPE while try to release a service
semaphore which does not acquire any lock
Leon created OFBIZ-5625:
---------------------------
Summary: NPE while try to release a service semaphore which does not acquire any lock
Key: OFBIZ-5625
URL: https://issues.apache.org/jira/browse/OFBIZ-5625
Project: OFBiz
Issue Type: Bug
Components: framework
Affects Versions: SVN trunk
Reporter: Leon
Fix For: SVN trunk
Set a service attribution "semaphore" to "fail" and try to run it twice in short delay. Since the first one obtains the lock, the second will "fail" and throws out the "SemaphoreFailException" exception which will be catch in ServiceDispatcher.runSync method and triggers the semophore.release within that the NPE occurred because of null lock value.
{quote}
2014-04-28 12:50:35,560 (OFBiz-JobQueue-1) [ GenericServiceJob.java:118:ERROR]
---- runtime exception report --------------------------------------------------
Async-Service failed.
Exception: java.lang.NullPointerException
Message: null
---- stack trace ---------------------------------------------------------------
java.lang.NullPointerException
org.ofbiz.service.semaphore.ServiceSemaphore.dbWrite(ServiceSemaphore.java:155)
org.ofbiz.service.semaphore.ServiceSemaphore.release(ServiceSemaphore.java:75)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:557)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:218)
org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83)
org.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:69)
org.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:619)
--------------------------------------------------------------------------------
{quote}
--
This message was sent by Atlassian JIRA
(v6.2#6252)