On the production server I only get the cryptic "500 null" error. On
the dev box I get a CF formatted Java error
"java.lang.StackOverflowError".
Does duplicate() perhaps have problems with highly recursive CFCs? The
CFC I've added which caused this problem is highly complex: a
container/collection object for several other types which all
cross-reference one another willy-nilly.
Could that be the root of the issue?
I would like to "duplicate" the struct (which is in the application
scope) so that I can delete it from the application scope and then do
some "busy work" on the data without locking the application scope. but
I would like the CFC reference to be duped, not the whole CFC.
In MX if I don't duplicate the struct (just do a simple assignment) then
delete the struct from application scope does the struct still hand
around because of the reference? For example:
<cfset OldSessions = StructNew()>
<cfloop collection="#Application.CurrentUsers#" item="KeyName">
<cfif DateCompare(Application.CurrentUsers[KeyName].SessionLastAccess +
Request.App.SessionTimeout, Now()) LT 1>
<!--- Duplicate into the OldSessions Struct --->
<cfset OldSessions[KeyName] =
Duplicate(Application.CurrentUsers[KeyName])>
<!--- Delete the Session --->
<cfset StructDelete(Application.CurrentUsers, KeyName)>
</cfif>
</cfloop>
This is part of a session management system which allows for "end of
session" processing. The "OldSessions" struct would then be looped over
and lots of work done with the data (storing session information for
metrics and analysis in a database, updating site stats, etc). When
this CFC reference is added to the "CurrentUsers" struct things blow up.
If I just removed the "Duplicate()" would the data still be in the
"OldSessions" struct even tho I delete it from the Application? Would
it still maintain that data due to the pointer or would the pointer then
become null?
Jim Davis
-----Original Message-----
From: Jim Davis [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 02, 2003 12:46 PM
To: CF-Talk
Subject: Duplicate() and CFCs cause JRUN Servlet Error (500 Null)?
I've just finished a marathon session trying to track down a bug. The
error returned was simply "500 Null" alone on the page (not a CF
formatted error) with a page title of "JRun Servlet Error".
It turns out the problem occurred only when I attempted to use
Duplicate() on a complex struct containing a reference to a CFC.
I'm having some trouble reducing the problem so it may be specific to:
1) References CFCs in the Application scope being Duplicated to the
local scope.
2) References to CFCs in complex (nested) structs being duplicated.
3) Something else.
It's clear however that the call to Duplicate() is the root of the
problem. This was all working for a very long time with a very complex
struct - the problem began immediately upon adding one CFC reference
into the struct.
Something with the CFC, Duplicate and maybe the Application scope?
Sound familiar to anybody?
Jim Davis
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

