Skip to main content
Ben Nadel at BFusion / BFLEX 2009 (Bloomington, Indiana) with: Andy Matthews and Steve Withington and Rob Huddleston and Dee Sadler
Ben Nadel at BFusion / BFLEX 2009 (Bloomington, Indiana) with: Andy Matthews ( @commadelimited ) Steve Withington ( @stevewithington ) Rob Huddleston Dee Sadler ( @DeeSadler )

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

By
Published in Comments (4)

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:

<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

Want to use code from this post? Check out the license.

Reader Comments

11 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?

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.

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

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel