Could Not Unlock The Names Lock "GOOGLE.TXT" Because No Lock Is Known By That Name

Posted January 30, 2007 at 7:38 AM

Tags: ColdFusion

I just had this error sent to me:

Could not unlock the named lock GOOGLE.TXT because no lock is known by that name.

I have absolutely no idea what this means. When I look at the chunk of code that seems to have triggered it, given the stack trace and ColdFusion tag context, it seems it was this CFLock tag:

 Launch code in new window » Download code as text file »

  • <cflock
  • timeout="5"
  • throwontimeout="false"
  • name="google.txt"
  • type="EXCLUSIVE">
  •  
  • <cffile
  • action="APPEND"
  • file="#GetDirectoryFromPath( GetCurrentTemplatePath() )#google.txt"
  • output="#LOCAL.QueryValue#"
  • addnewline="true"
  • fixnewline="false"
  • />
  •  
  • </cflock>

But what about that could cause the error? And why would ColdFusion attempt to unlock a lock that had no name? I can only assume that the server was having a bit of trouble (hanging or about to shut down) and just "could not compute." The way I figure it, the only reason it would go to Unlock a lock would be in the close of a CFLock tag. However, if that was the case, surely the CFLock tag would know its own name??? Very curious.

Here is some of the stack trace if you are interested:

coldfusion.runtime.LockManager$UnknownLockException: Could not unlock the named lock .....GOOGLE.TXT because no lock is known by that name. at coldfusion.runtime.LockManager.releaseNamedLock(LockManager.java:89) at coldfusion.tagext.lang.LockTag.doFinally(LockTag.java:209) at cfApplication2ecfc1429649158$funcONSESSIONSTART.runFunction

Download Code Snippet ZIP File

Post Comment  |  Ask Ben  |  Permalink  |  Other Searches  |  Print Page



Learning ColdFusion 9 - ColdFusion 9 tutorials, samples, examples, demos

Reader Comments

Jan 30, 2007 at 7:55 AM // reply »
5 Comments

Is this code recently written? the name google.txt seems strange to me, only because it possibly may be that cf is thinking that is a variable of some sort?

Does it error every time, or just once in a blue moon?


Jan 30, 2007 at 8:24 AM // reply »
6 Comments

first thing that strikes me is the use of a "." in the name, maybe its causing a problem. I know it should be a string but maybe under the hood in java its freaking it out.


Jan 30, 2007 at 8:27 AM // reply »
6 Comments

google has a cached version of this error. Doesnt look like the "." is the cause as this guys lock has a different name

http://216.239.59.104/search?q=cache:mhw3IYXq4pAJ:www.helpdesk.umd.edu/os/unix/applications/pine/394/+%22Could+not+unlock+the+named+lock+%22+%22because+no+lock+is+known+by+that+name%22&hl=en&ct=clnk&cd=2


Jan 30, 2007 at 8:29 AM // reply »
6 Comments

I should google before adding comments!

heres the answer

http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:42844

should be i a hot fix by the sounds of it


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 21, 2009 at 4:49 PM
Styling The ColdFusion 8 WriteToBrowser CFImage Output
Great work yet again Ben! Whilst I didn't use this whole code, I copied some of your regex code for a similar problem with the lack of an alt attribute and unescaped ampersands in CFIMAGE for Railo 3 ... read »
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »
Nov 21, 2009 at 10:56 AM
HostMySite.com Has The Best ColdFusion Hosting
@Mehul, Yes very nice people, however several downtimes per day which was not acceptable. Hence we had to move out. I am glad you are having good luck with them so far. ... read »
Nov 20, 2009 at 11:32 PM
Five Months Without Hungarian Notation And I'm Loving It
I've used headless camel case for years for not only ColdFusion variables, but also SQL tables and fields... pretty much everything involving code. I also subscribe to the "don't abbreviate and clea ... read »
Nov 20, 2009 at 11:00 PM
Five Months Without Hungarian Notation And I'm Loving It
@Marcel, Yeah, I always err on the side of longer but more readable variable names. As for the camel casing of CF methods and the headless camel casing of custom items, I get around this by always ... read »