I wrote some code to loop through and delete all entities (rows) of a kind
(table) and on deleting the first row, this error is thrown:
*BlueDragon Internal Server Error**The page you were executing caused an
internal BlueDragon server error*Request/index.cfmFile Trace
/home/baz/Source/GAE-OpenBD/war/index.cfm
|
+-- /home/baz/Source/GAE-OpenBD/war/WEB-INF/bluedragon/component.cfcType
InternalTag ContextCFSILENT (/home/baz/Source/GAE-OpenBD/war/index.cfm,
Line=1, Column=1)
|
+-- CFIF (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=3, Column=2)
|
+-- CFLOOP (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=11,
Column=3)
|
+-- CFSET (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=12,
Column=4)
|
+-- CFFUNCTION
(/home/baz/Source/GAE-OpenBD/war/WEB-INF/bluedragon/component.cfc, Line=11,
Column=2)
|
+-- CFRETURN
(/home/baz/Source/GAE-OpenBD/war/WEB-INF/bluedragon/component.cfc, Line=12,
Column=3)Source
9 : </cffunction>
10:
11: <cffunction name="googleDelete" access="public" returntype="any"
output="false">
12: <cfreturn googleDelete( this )>
13: </cffunction>
^ Snippet from underlying CFML sourceStack Trace
java.lang.NullPointerException
This is the code:
<!--- query all visitors --->
<cfquery name="Visitors" dbtype="google">
SELECT FROM Visitor
ORDER BY VisitorCount DESC
</cfquery>
<cfdump var="#Visitors#">
<cfflush />
<!-- loop through each visitor and delete --->
<cfloop array="#visitors#" index="v">
<cfset v.googleDelete() />
</cfloop>
<!--- re-query all visitors --->
<cfquery name="Visitors" dbtype="google">
SELECT FROM Visitor
ORDER BY VisitorCount DESC
</cfquery>
<cfdump var="#Visitors#">
If the delete is changed to:
<cfset googleDelete(v.GoogleKey()) />
The error is slightly different:
*BlueDragon Internal Server Error**The page you were executing caused an
internal BlueDragon server error*Request/index.cfmFile Trace
/home/baz/Source/GAE-OpenBD/war/index.cfmTypeInternalTag ContextCFSILENT
(/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=1, Column=1)
|
+-- CFIF (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=3, Column=2)
|
+-- CFLOOP (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=11,
Column=3)
|
+-- CFSET (/home/baz/Source/GAE-OpenBD/war/index.cfm, Line=12,
Column=4)Source
9 : <cfdump var="#Visitors#">
10: <cfflush />
11: <cfloop array="#visitors#" index="v">
12: <cfset googleDelete(v.GoogleKey()) />
13: </cfloop>
^ Snippet from underlying CFML sourceStack Trace
java.lang.NullPointerException
One row gets deleted and invokes the error.
Baz
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official site @ http://www.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---