This content has been marked as final. Show 5 replies
Nevermind, I did it a different way
Here is a call to the Thread.sleep method:
I'm trying to use the sleep script you provided and when I try to variblize the time using some calculations (see the example below) it throws the following error:
The selected method sleep was not found.
Either there are no methods with the specified method name and argument types, or the method sleep is overloaded with arguments types that ColdFusion can't decipher reliably. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity.
<cfset SleepSeconds = 1000 * 2>
thrObj = CreateObject("java", "java.lang.Thread");
Any Ideas would be greatly appreciated.
> <cfset SleepSeconds = 1000 * 2>
> thrObj = CreateObject("java", "java.lang.Thread");
sleep method is looking for a java "long". since you did some calculations on
SleepSeconds cf converts into a float (i think). use javacast
Thanks! This did the trick