>- see footer for list info -<
I have an issue where Coldspring is working fine with my site, then
after some time Colsdspring throws an error stating “Array Element
Type Mismatch”.
Having had a look at the code further Coldspring is errors when it
reaches line 1106 in defaultXMLBeanFactory.cfc
The line of code is:
<cfset var flattenedMetaData = duplicate(arguments.md)/>
This line of code belongs to the “flattenMetaData” function and it
takes the metadata of a CFC as a parameter (arguments.md).
<cffunction name="flattenMetaData" access="public" output="false"
hint="takes metadata, copies inherited methods into the top level
function array, and returns it" returntype="struct">
<cfargument name="md" type="struct" required="true" />
<cfset var i = "" />
<cfset var flattenedMetaData = duplicate(arguments.md)/>
<cfset var foundFunctions = ""/>
<cfset var access = "" />
<cfset flattenedMetaData.functions = arraynew(1)/>
<cfloop condition="true">
<cfif structKeyExists(arguments.md, "functions")>
<cfloop from="1"
to="#arrayLen(arguments.md.functions)#" index="i">
<!--- get the access type, so we can
skip private methods --->
<cfif
structKeyExists(arguments.md.functions[i],'access')>
<cfset access =
arguments.md.functions[i].access />
<cfelse>
<cfset access = 'public' />
</cfif>
<cfif not
listFind(foundFunctions,arguments.md.functions[i].name)>
<cfset foundFunctions =
listAppend(foundFunctions,arguments.md.functions[i].name)/>
<cfif access is not 'private'>
<cfset
arrayAppend(flattenedMetaData.functions,duplicate(arguments.md.functions[i]))/>
</cfif>
</cfif>
</cfloop>
</cfif>
<cfif structKeyExists(arguments.md, "extends")>
<cfset arguments.md = arguments.md.extends />
<cfelse>
<cfbreak />
</cfif>
</cfloop>
<cfreturn flattenedMetaData/>
</cffunction>
Normally this works fine, but at some point Coldfusion adds an
additional key to the getMetaData() results called skeleton which
contains a Java object forcing the above line of code to error.
This problem has been encountered before as mentioned in this post,
but a solution was never mentioned:
http://www.mail-archive.com/[email protected]/msg01281.html
You’ll notice the article mention Coldfusion 6.1, but I have
experienced it running Coldfusion 7.02, IIS 6 and
ColdSpring-1.2-Patched
Does anyone know why this is happening and if there is a solution to
stop this from happening?
--
Simon Baynes
www.simonbaynes.com
LinkedIn profile:- http://www.linkedin.com/in/simonbaynes
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<