I have a ColdFusion event gateway that sometimes produces an error on the following line (where Local.curThread is a digit 1-5):
<cflock name="eventCachedQueryUpdate_thread_#Local.curThread#" timeout="0" throwontimeout="no">
The error is:
Message: timeout value is negative
Type: java.lang.IllegalArgumentException
Here's a StackTrace:
java.lang.IllegalArgumentException: timeout value is negative at java.lang.Object.wait(Native Method) at coldfusion.runtime.RWLock.waitForLock(RWLock.java:154) at coldfusion.runtime.RWLock.requestWriteLock(RWLock.java:124) at coldfusion.runtime.RWLock.requestLock(RWLock.java:46) at coldfusion.runtime.LockManager.requestNamedLock(LockManager.java:73) at coldfusion.tagext.lang.LockTag.doStartTag(LockTag.java:186) at cfeventCachedQueryUpdate2ecfc749015300$funcONINCOMINGMESSAGE.runFunction(D:\Applications\CFusion\CustomTags\4C\eventCachedQueryUpdate.cfc:21) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:437) at coldfusion.filter.EventComponentFilter.invoke(EventComponentFilter.java:67) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:399) at coldfusion.filter.EventRequestMonitorFilter.invoke(EventRequestMonitorFilter.java:47) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.eventgateway.EventProxy.invokeComponent(EventProxy.java:66) at coldfusion.eventgateway.EventProxy.invokeComponent(EventProxy.java:47) at coldfusion.eventgateway.EventRequestHandler.invokeCFC(EventRequestHandler.java:185) at coldfusion.eventgateway.EventRequestHandler.processRequest(EventRequestHandler.java:111) at coldfusion.eventgateway.EventRequestDispatcher$Task.run(EventRequestDispatcher.java:122) at coldfusion.util.SimpleWorkerThread.run(SimpleThreadPool.java:210)
Since the timeout attribute of cflock is always 0 I don't see how that could be resulting in a negative timeout value. Any ideas what's causing this and how to prevent it? Is this a bug in cflock?
I'm running Adobe ColdFusion 9.0.1.274733 Enterprise on Windows Server 2008 R2 with Java 1.6.0_17.
RWLockclass according to the stack trace. If the error is to be believed, that number is negative, which causes the exception when CF invokesObject.wait(...). - Leigh