Hi,
I have managed to come across this as well, in differing circumstances
and constantly.
The error occurs in the threadChecker call and I get the error:
key ['thread2234'] doesn't exist in struct (keys:thread2234)
Im including my code here:
File threadStarter.cfm
<cfsilent>
<cfset threadName = "thread2234">
<cfthread action="run" name="#threadName#">
<cfset SESSION.Threads[ THREAD.Name ] = Duplicate(THREAD) />
<!--- sleep thread 5 secs --->
<cfset thread = CreateObject("java", "java.lang.Thread")>
<cfset thread.sleep(5000)>
<cfset finished = true>
</cfthread>
</cfsilent>
<cfoutput>
<html>
<body>
<script type="text/javascript" src="jQuery/jquery.js"></script>
<script type="text/javascript">
// Load the thread activity via jQuery's
// AJAX functionality. This will load the
// returned value into the innerHTML.
function UpdateThreadActivity(){
$.get(
"threadChecker.cfm?threadName='#threadName#'",
{},
function(data){
if(!data.finish){
setTimeout(
UpdateThreadActivity,
100
);
}else{
$( "##threadActivity" ).html("Finished");
}
}, "json"
);
}
// When the document has loaded, start
// updating the thread activity.
$( UpdateThreadActivity );
</script>
<h2>Thread Test</h2>
<p></p>
<p id="threadActivity">Thread running...</p>
</body>
</html>
</cfoutput>
<cfflush>
And threadChecker.cfm
<!--- Kill extra output. --->
<cfsilent>
<cfparam name="URL.threadName" type="string"/>
<cfset r = structNew()>
<cfset objThread = SESSION.Threads[ threadName ] />
<cfif isDefined("objThread.finished") AND objThread.finished>
<cfset r["finished"] = true>
<cfset StructDelete(APPLICATION.Threads, threadName) />
<cfthread action="terminate" name="#threadName#"/>
<cfelse>
<cfset r["finished"] = false>
</cfif>
<cfsavecontent variable="strThreadData">
<cfoutput>
#SerializeJSON(r)#
</cfoutput>
</cfsavecontent>
<!--- Output the thread innerHTML. --->
<cfcontent type="text/html"
variable="#ToBinary( ToBase64( strThreadData ) )#" />
</cfsilent>
~Simeon.
> > > at log2.log4cf_cfc$cf.udfCall(/mnt/data/websites/mailquatro_large_data/www/log 2/log4CF.cfc):-1
> > > at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:166):166
> > > at railo.runtime.type.UDFImpl._call(UDFImpl.java:319):319
> > > at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284
> > > at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variable UtilImpl.java:622):622
> > > at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1259):1259
> > > at log2.log4cf_cfc$cf.udfCall2(/mnt/data/websites/mailquatro_large_data/www/lo g2/log4CF.cfc:112):112
> > > at log2.log4cf_cfc$cf.udfCall(/mnt/data/websites/mailquatro_large_data/www/log 2/log4CF.cfc):-1
> > > at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:166):166
> > > at railo.runtime.type.UDFImpl._call(UDFImpl.java:319):319
> > > at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284
> > > at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variable UtilImpl.java:622):622
> > > at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1259):1259
> > > at log2.log4cf_cfc$cf.udfCall1(/mnt/data/websites/mailquatro_large_data/www/lo g2/log4CF.cfc:52):52
> > > at log2.log4cf_cfc$cf.udfCall(/mnt/data/websites/mailquatro_large_data/www/log 2/log4CF.cfc):-1
> > > at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:166):166
> > > at railo.runtime.type.UDFImpl._call(UDFImpl.java:319):319
> > > at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284
> > > at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variable UtilImpl.java:622):622
> > > at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1259):1259
> > > at log2.log4cf_cfc$cf.udfCall1(/mnt/data/websites/mailquatro_large_data/www/lo g2/log4CF.cfc:24):24
> > > at log2.log4cf_cfc$cf.udfCall(/mnt/data/websites/mailquatro_large_data/www/log 2/log4CF.cfc):-1
> > > at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:166):166
> > > at railo.runtime.type.UDFImpl._call(UDFImpl.java:319):319
> > > at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284
> > > at railo.runtime.ComponentImpl._call(ComponentImpl.java:400):400
> > > at railo.runtime.ComponentImpl._call(ComponentImpl.java:332):332
> > > at railo.runtime.ComponentImpl.call(ComponentImpl.java:1486):1486
> > > at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(Variable UtilImpl.java:617):617
> > > at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1259):1259
> > > at application_cfc$cf.udfCall(/mnt/data/websites/mailquatro_large_data/www/App lication.cfc:38):38
> > > at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:166):166
> > > at railo.runtime.type.UDFImpl._call(UDFImpl.java:319):319
> > > at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284
> > > at railo.runtime.ComponentImpl._call(ComponentImpl.java:400):400
> > > at railo.runtime.ComponentImpl._call(ComponentImpl.java:332):332
> > > at railo.runtime.ComponentImpl.call(ComponentImpl.java:1486):1486
> > > at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:282):2 82
> > > at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java: 102):102
> > > at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:23) :23
> > > at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1679):1679
> > > at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:248):24 8
> > > at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
> > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:91):91
> > > at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.j ava:103):103
> ...
>
> read more »