Coldfusion: Nested Loop on api call Array & Struct - coldfusion

My function calls the SendGrid API. It returns an Array + structure. I'm writing a function to return a CFQuery dataset.
Goal
I want to pass a deserialized data object to my function and get a query dataset.
Here is my working code and the output:
<cfparam name="variables.ddata" default="#structnew()#">
<!--- API Call Code here --->
<cfset arr = DESerializeJSON(returnStruct.Filecontent) />
<cfdump var="#arr#">
My code:
<cfset arrayit(arrobj= arr) >
<cfdump var="#variables.ddata#" >
<cffunction name="arrayit" access="public" returntype="void">
<cfargument name="arrobj" type="array" required="yes">
<cfset var arr=arguments.arrobj />
<cfloop from="1" to = "#arrayLen(arr)#" index="i">
<cfif isValid("string", arr[i])>
<cfset StructInsert(variables.ddata, i, arr[i]) />
</cfif>
<cfif isstruct(arr[i])>
<cfset structit(structobj = arr[i]) />
</cfif>
</cfloop>
</cffunction>
<cffunction name="structit" access="public" returntype="void" output="yes">
<cfargument name="structobj" type="any" required="yes">
<cfset stru = arguments.structobj />
<cfloop collection="#stru#" item="S">
<cfif isValid("string", stru[S])>
<cfset StructInsert( variables.ddata, S, stru[S]) />
</cfif>
<cfif isarray(stru[S])>
<cfset arrayit(arrobj = stru[S]) >
</cfif>
</cfloop>
</cffunction>
Result:
When I add this line in my function
<cfif isstruct(stru[S])>
<cfset variables.ddata = arrayit(arrobj = stru[S]) />
</cfif>
An error occurs:
Element type is undefined in a CFML structure referenced as part of an
expression. The error occurred on line 71.
** Full Code**
<cfsavecontent variable="returnStruct.Filecontent">
[{"date":"2016-04-05","stats":[{"type":"category","name":"5","metrics":{"blocks":1,"bounce_drops":0,"bounces":9,"clicks":4,"deferred":1,"delivered":1,"invalid_emails":8,"opens":4,"processed":1,"requests":1,"spam_report_drops":0,"spam_reports":1,"unique_clicks":3,"unique_opens":3,"unsubscribe_drops":0,"unsubscribes":9}}]}]
</cfsavecontent>
<cfset arr = DESerializeJSON(returnStruct.Filecontent) />
<cfloop from="1" to="#arrayLen(arr)#" index="i">
<cfif isValid("string", arr[i])>
<cfset StructInsert(variables.ddata, i, arr[i],true ) />
</cfif>
<cfif isstruct(arr[i])>
<cfsavecontent variable="rr">
<cfdump var="#arr[i]#" label="Line 48 ERROR" >
</cfsavecontent>
<cfset NotifyErrorAdmin(emailBody = "#rr#" ,emailsubject = "Line 48") />
<cfset structit(structobj = arr[i]) />
</cfif>
<cfif isarray(arr[i])>
<cfsavecontent variable="rr">
<cfdump var="#arr[i]#" label="Line 54 ERROR" >
</cfsavecontent>
<cfset NotifyErrorAdmin(emailBody = "#rr#" ,emailsubject = "Line 54") />
<cfset arrayit(arrobj = arr[i]) >
</cfif>
</cfloop>
</cffunction>
<cffunction name = "structit" access="public" returntype="void" output="yes">
<cfargument name = "structobj" type="any" required="yes">
<cfset stru = arguments.structobj />
<cfloop collection="#stru#" item="S">
<cfif isValid("string", stru[S])>
<cfset StructInsert( variables.ddata, S, stru[S],true) />
</cfif>
<cfif isarray(stru[S])>
<cfsavecontent variable="rr">
<cfdump var="#stru[S]#" label="Line 86 ERROR" >
</cfsavecontent>
<cfset NotifyErrorAdmin(emailBody = "#rr#" ,emailsubject = "Line 87") />
<cfset arrayit(arrobj = stru[S]) >
</cfif>
<cfif isstruct(stru[S])>
<cfsavecontent variable="rr">
<cfdump var="#stru[S]#" label="Line 97 ERROR" >
</cfsavecontent>
<cfset NotifyErrorAdmin(emailBody = "#rr#" ,emailsubject = "Line 97") />
<cfset structit(structobj = stru[S]) />
</cfif>
</cfloop>
</cffunction>
ERROR

Your UDF arrayit accepts an argument of type array but when that condition is true then a struct is being passed so, the error.
i.e.,
<cfif isStruct(stru[S])>
<!--- This means stru[S] is a struct --->
<cfset variables.ddata = arrayit(arrobj = stru[S])>
<!--- arrObj should be of type 'array' --->
</cfif>
So, it should be:
<cfif isStruct(stru[S])>
<cfset variables.ddata = structit(structobj = stru[S])>
</cfif>
But, the error for this case will be different than that you have added.
Additionally,
StructInsert() takes an optional argument allowoverwrite which is by default false and according to docs:
if key exists and allowoverwrite = "False", ColdFusion throws an
exception.

I just did it! :) just wanted to share my project with you guys also hope it will help someone else also...
Request if you guys find anything you feel I can improve please share.
Special Thanks for response on my post. #Beginner & #Leigh
API Call Json Return: 1
<cfsavecontent variable="returnStruct.Filecontent">
[{"date":"2016-04-05","stats":[{"type":"category","name":"5","metrics":{"blocks":1,"bounce_drops":0,"bounces":9,"clicks":4,"deferred":1,"delivered":1,"invalid_emails":8,"opens":4,"processed":1,"requests":1,"spam_report_drops":0,"spam_reports":1,"unique_clicks":3,"unique_opens":3,"unsubscribe_drops":0,"unsubscribes":9}}]}]
</cfsavecontent>
<cfset arr = DESerializeJSON(returnStruct.Filecontent) />
CFC : 2
<cfcomponent>
<cfparam name="variables.qryclsvar" default="" type="any"/>
<cfparam name="variables.qryclsvarfg" default="true" type="any"/>
<cffunction name="APItoquery" access="public" returntype="any">
<cfargument name = "APIobj" type="any" required="yes">
<cfset var vAPIobj = arguments.APIobj />
<cfset var APIDATA = structnew() />
<cfset var APIDATAqr = "" />
<cftry>
<cfloop from="1" to="#arrayLen(vAPIobj)#" index="jj">
<cfif isarray(vAPIobj[jj])>
<cfset APIDATA = arrayit(structobj = vAPIobj[jj] ,datastruct = APIDATA) />
</cfif>
<cfif isstruct(vAPIobj[jj])>
<cfset APIDATA = structit(structobj = vAPIobj[jj],datastruct = APIDATA) />
</cfif>
<cfif NOT StructIsEmpty(APIDATA)>
<!--- Add in query object --->
<cfset APIDATAqr = structtoquery(structobj= APIDATA) />
<cfelse>
<cfset APIDATAqr ="NO Data Found!" />
</cfif>
</cfloop>
<cfcatch>
<cfdump var="#cfcatch#" label="APItoquery">
</cfcatch>
</cftry>
<cfreturn APIDATAqr>
</cffunction>
<cffunction name = "arrayit" access="public" returntype="any">
<cfargument name = "arrobj" type="any" required="yes">
<cfargument name = "datastruct" type="any" required="yes" >
<cfset var arr = arguments.arrobj />
<cfset var arrdata = arguments.datastruct />
<cftry>
<cfloop from="1" to="#arrayLen(arr)#" index="i">
<cfif ArrayContains(arr, i) >
<cfset StructInsert(arrdata, i, arr[i],true ) />
</cfif>
<cfif isarray(arr[i])>
<cfset arrdata = arrayit(arrobj = arr[i] ,datastruct = arrdata) >
</cfif>
<cfif isstruct(arr[i]) >
<cfset stdata = structit(structobj = arr[i],datastruct = arrdata) />
</cfif>
</cfloop>
<cfcatch>
<cfdump var="#cfcatch#" label="arrayit">
</cfcatch>
</cftry>
<cfreturn arrdata>
</cffunction>
<cffunction name = "structit" access="public" returntype="any" output="yes">
<cfargument name = "structobj" type="any" required="yes">
<cfargument name = "datastruct" type="any" required="yes">
<cfset var stru = arguments.structobj />
<cfset var stdata = arguments.datastruct />
<cftry>
<cfloop collection="#stru#" item="S">
<cfif isarray(stru[S])>
<cfset stdata = arrayit(arrobj = stru[S] ,datastruct = stdata) >
<cfelseif isstruct(stru[S]) >
<cfset stdata = structit(structobj = stru[S],datastruct = stdata) />
<cfelse>
<cfset StructInsert( stdata, S, stru[S],true) />
</cfif>
</cfloop>
<cfcatch>
<cfdump var="#cfcatch#" label="structit">
</cfcatch>
</cftry>
<cfreturn stdata>
</cffunction>
<cffunction name = "structtoquery" access="public" returntype="any" output="yes">
<cfargument name = "structobj" type="any" required="yes">
<cfset var vstructobj = arguments.structobj />
<cfset var cols = StructKeyList(vstructobj)>
<cfset var colstyp = "">
<cftry>
<cfif variables.qryclsvarfg EQ true>
<cfloop from="1" to="#listlen(cols,',')#" index="L">
<cfset colstyp = ListAppend(colstyp,"VarChar",",")>
</cfloop>
<!--- Create a new query. --->
<cfset variables.qryclsvar = queryNew(
'#cols#',
'#colstyp#'
)>
<cfset variables.qryclsvarfg = false>
</cfif>
<cfset QueryAddRow(variables.qryclsvar, 1)>
<cfloop collection="#vstructobj#" item="sd">
<cfset QuerySetCell(variables.qryclsvar, "#sd#", vstructobj[sd])>
</cfloop>
<cfcatch>
<cfdump var="#cfcatch#" label="structit">
</cfcatch>
</cftry>
<cfreturn variables.qryclsvar>
</cffunction>
</cfcomponent>
CFM : 3
<cfset sgObj = createobject("component","cfc.mycfc") />
<cfset mystruct = sgObj.APItoquery(APIobj= arr1) >
<cfdump var="#mystruct#" label="mystruct">
MA ! ....

Related

jqgrid function behaving odd in coldfusion 2018

I have this function
<cffunction name="queryConvertForJQGRID" access="package" returntype="any" output="false">
<cfargument name="q" type="query" required="yes">
<cfargument name="page" type="numeric" required="no" default="1">
<cfargument name="rows" type="numeric" required="no" default="500">
<cfset var result = structnew()>
<cfset var rowStruct = structnew()>
<cfset var col = "">
<cfset result["page"] = arguments.page>
<cfset result["total"] = ceiling(arguments.q.TotalrecordCount/arguments.rows)>
<cfset result["records"] = arguments.q.TotalrecordCount>
<cfset result["rows"] = arraynew(1)>
<cfset queryDeleteColumn(arguments.q,'TotalrecordCount')>
<cfset queryDeleteColumn(arguments.q,'rowNum')>
<cfif server.coldfusion.productname eq 'lucee'>
<cfset columnLabels = QueryColumnArray(arguments.q)>
<cfelse>
<cfset columnLabels = arguments.q.columnList.listToArray()>
</cfif>
<cfloop query="#arguments.q#">
<cfset rowStruct = [:]><!--- Tada an ordered struct --->
<cfloop array="#columnLabels#" item="col">
<cfset rowStruct[col] = arguments.q["#col#"]>
</cfloop>
<cfset arrayappend(result.rows, rowStruct)>
</cfloop>
<cfreturn result />
</cffunction>
works perfect with lucee, but in coldfusion 2018, every row is showing the value as comma separated and all rows are in all rows. that is very weird
Screenshot
here is the screenshot https://prnt.sc/rcltqm
so i have like this
<cfset retJSON = queryConvertForjQGrid(local.returnQry, arguments.page, arguments.rows)>
<cfdump var="#retJSON#" abort>
and the structure is returned like this
https://prnt.sc/rcniba

Error while executing the cfc : The value returned from the function is not of type json

I have written a web-service in ColdFusion which returns message (success/failure) by checking the input values in the database.
To run the cfc, I am directly providing the arguments in the URL, like this:
http://localhost/AimsWeb/Authenticate2.cfc?method=AuthenticateUser&returnformat=json&CustomerID=1&username=xxx&password=xxxx
But when I run this page, it ends with an error like below:
This is my CFC:
<cfcomponent rest="true" restpath="/AimsWeb"> <!--- REST Service--->
<cffunction name="AuthenticateUser" access="remote" httpmethod="POST" returnFormat="JSON" returntype="json">
<!---- Defining Arguments--->
<cfargument name="Username" type="string" required="Yes">
<cfargument name="Password" type="string" required="Yes">
<cfargument name="CustomerID" type="string" required="Yes">
<!---- Setting the Form Values (which we will get from AW+) and setting it to arguments passed--->
<cfset Form.CustomerID = arguments.CustomerID>
<cfset Form.Username = arguments.Username>
<cfset Form.Password = Hash(arguments.Password)>
<cfif StructKeyExists (form, 'CustomerID') and StructKeyExists(form, 'UserName') and StructKeyExists (form, 'password')>
<cfquery name="AllUsers" datasource="#Application.GomDatasource#">
SELECT u.UserTypeID, u.UserID, u.CustomerID, u.UserName, u.Password
FROM tblUsers u
WHERE u.CustomerID = <cfqueryparam cfsqltype="cf_sql_integer" value="#Form.CustomerID#">
</cfquery>
<!--- This is to check whether provided parameters are valid by checking the same in the database--->
<cfset local.StatusStruct = StructNew()>
<cfif form.customerid EQ "" OR form.username EQ "" OR form.password EQ "">
<cfset local.StatusStruct['errorCode'] = 400>
<cfset local.StatusStruct['errorMessage'] = "Insufficient Input.">
<cfelseif AllUsers.RecordCount AND form.CustomerId EQ AllUsers.CustomerID AND form.username EQ AllUsers.UserName AND form.password EQ AllUsers.Password>
<cfset local.StatusStruct['errorCode'] = 200>
<cfset local.StatusStruct['errorMessage'] = "Success">
<cfelseif AllUsers.CustomerID NEQ form.CustomerID>
<cfset local.StatusStruct['errorCode'] = 400>
<cfset local.StatusStruct['errorMessage'] = "Customer Id doesn't exist">
<cfelseif AllUsers.UserName NEQ form.UserName>
<cfset local.StatusStruct['errorCode'] = 400>
<cfset local.StatusStruct['errorMessage'] = "User not found">
<cfelseif AllUsers.Password NEQ form.password>
<cfset local.StatusStruct['errorCode'] = 400>
<cfset local.StatusStruct['errorMessage'] = "Invalid Password">
</cfif>
<!--- Returning the status in JSON form--->
</cfif>
<cfreturn local.StatusStruct>
</cffunction>
</cfcomponent>
Can anyone help me please?
it worked. The returntype=json was not valid. I removed that line and it worked.
<cffunction name="AuthenticateUser" access="remote" httpmethod="GET" returnFormat="JSON">
Thanks ALL for your help.

Losing variable. Element is undefined in VARIABLES

We are getting this error in both ColdFusion 9 and ColdFusion 11 servers in production. I originally thought is related to ColdFusion 9 and JavaHeap space or not enough memory. We moved this process to run on a brand new server (ColdFusion 11) where nothing else is running and has a lot of memory and we still get the error. Here is some of the code for this cfm page:
<cfset variables.email_count = 0>
<!--- email notifications --->
<cfoutput query="getOrdersForNotification" group="order_id">
<cfset variables.inv = "">
<cfset variables.usePdf = false>
<cfif isDefined("application.feature_list_using_pdf_attachment")
and listFindNoCase(application.feature_list_using_pdf_attachment, "injection scheduler", ",")
>
<cfset variables.usePdf = true>
</cfif>
<cfthread name="InjectionSchdEmail#dateFormat(now(), 'mmdd')#_#timeFormat(now(), 'HHmmss')#_#getOrdersForNotification.order_id#"
threadOrderId="#getOrdersForNotification.order_id#"
threadMemberId="#getOrdersForNotification.member_id#"
threadNotificationEmail="#getOrdersForNotification.notification_email#"
threadDateReq="#getOrdersForNotification.date_req#"
threadStoreCode="#getOrdersForNotification.store_code#"
threadStoreName="#getOrdersForNotification.store_name#"
threadToGoLabel="#application.togo_label#"
threadOrderTotal="#getOrdersForNotification.order_total#"
threadDelTimeValueFront="#getOrdersForNotification.del_time_value_front#"
threadSubject="#variables.subjectAndBodyTemplates.subject#"
threadBody="#variables.subjectAndBodyTemplates.body#"
threadFromEmail="#variables.fromEmail#"
threadLocalNow="#variables.localNow#"
threadLocalNowInt="#variables.localNowInt#"
threadDs="#ds#"
threadUsePdf="#variables.usePdf#"
>
<cftry>
<cfset url.order_id = threadOrderId>
<cfset url.member_id = threadMemberId>
<cfsavecontent variable="variables.inv">
<cfinclude template="invoicedeska.cfm">
</cfsavecontent>
<cfset variables.order_day=dateFormat(application.UdfService.toSlashDate(threadDateReq), 'mmm dd')>
<cfset local.subject = threadSubject>
<cfset local.subject = ReplaceNoCase(local.subject, "[Store Code]", threadStoreCode, "all")>
<cfset local.subject = ReplaceNoCase(local.subject, "[Takeout Label]", threadToGoLabel, "all")>
<cfset local.subject = ReplaceNoCase(local.subject, "[Order ID]", threadOrderId, "all")>
<cfset local.subject = ReplaceNoCase(local.subject, "[Order Total]", NumberFormat(threadOrderTotal,"9,999.99"), "all")>
<cfset local.subject = ReplaceNoCase(local.subject, "[Required Time]", threadDelTimeValueFront, "all")>
<cfset local.subject = ReplaceNoCase(local.subject, "[Required Date]", variables.order_day, "all")>
<cfset local.body = threadBody>
<cfset local.body = ReplaceNoCase(local.body, "[Store Code]", threadStoreCode, "all")>
<cfset local.body = ReplaceNoCase(local.body, "[Store Name]", threadStoreName, "all")>
<cfset local.body = ReplaceNoCase(local.body, "[Order ID]", threadOrderId, "all")>
<cfset local.body = ReplaceNoCase(local.body, "[Order Total]", NumberFormat(threadOrderTotal,"9,999.99"), "all")>
<cfset local.body = ReplaceNoCase(local.body, "[Required Time]", threadDelTimeValueFront, "all")>
<cfset local.body = ReplaceNoCase(local.body, "[Required Date]", variables.order_day, "all")>
<cfset local.body = "<span style='font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: ##000000'>#application.UdfService.multiLiner(local.body)#</span>">
<cfif threadUsePdf>
<!--- PDF version --->
<cfdocument
format="PDF"
name="variables.attachment"
localURL="#application.pdf_localURL#"
orientation="#application.pdf_orientation#"
marginleft="#application.pdf_marginleft#"
marginright="#application.pdf_marginright#"
margintop="#application.pdf_margintop#"
marginbottom="#application.pdf_marginbottom#"
unit="#application.pdf_unit#"
scale="#application.pdf_scale#"
>
#variables.inv#
</cfdocument>
<cfelse>
<!--- HTML version --->
<cfset variables.attachment = variables.inv>
</cfif>
<cfmail to="#threadNotificationEmail#" from="#threadFromEmail#" subject="#local.subject#" type="html">
#local.body#
<cfif isDefined("variables.attachment") and threadUsePdf eq false>
<cfmailparam
file="invoice_#threadOrderId#_#threadLocalNowInt#.html"
type="application/html"
content="#variables.attachment#"
/>
<cfelseif isDefined("variables.attachment") and threadUsePdf>
<cfmailparam
file="invoice_#threadOrderId#_#threadLocalNowInt#.pdf"
type="application/pdf"
content="#variables.attachment#"
/>
</cfif>
</cfmail>
<cfset invoice_emailed = application.MessageService.setEmailedInvoice(orderId = threadOrderId, localNow = threadLocalNow, emailAddress = threadNotificationEmail, datasource = threadDs)>
<cfcatch type="any">
<cfset variables.attachment = "">
<cfmail from="erroralerts#monkeymediasoftware.com" to="erroralerts#monkeymediasoftware.com" type="html" subject="POS injection notification email faliure">
<cfif isDefined("cgi.server_name")>
Server: <b>#cgi.server_name#</b>
</cfif>
<cfdump var="#cfcatch#" label="cfcatch"><br />
<cfdump var="#threadOrderId#" label="threadOrderId"><br />
<cfdump var="#threadMemberId#" label="threadMemberId"><br />
<cfdump var="#threadNotificationEmail#" label="threadNotificationEmail"><br />
<cfdump var="#threadDateReq#" label="threadDateReq"><br />
<cfdump var="#threadStoreCode#" label="threadStoreCode"><br />
<cfdump var="#threadStoreName#" label="threadStoreName"><br />
<cfdump var="#threadToGoLabel#" label="threadToGoLabel"><br />
<cfdump var="#threadOrderTotal#" label="threadOrderTotal"><br />
<cfdump var="#threadDelTimeValueFront#" label="threadDelTimeValueFront"><br />
<cfdump var="#local.subject#" label="local.subject"><br />
<cfdump var="#local.body#" label="local.body"><br />
<cfdump var="#threadFromEmail#" label="threadFromEmail"><br />
<cfdump var="#threadLocalNow#" label="threadLocalNow"><br />
<cfdump var="#threadLocalNowInt#" label="threadLocalNowInt"><br />
<cfdump var="#threadDs#" label="threadDs"><br />
<cfdump var="#threadUsePdf#" label="threadUsePdf"><br />
<cfdump var="#variables.inv#" label="variables.inv"><br />
</cfmail>
<cfrethrow />
</cfcatch>
</cftry>
</cfthread>
<cfset variables.email_count = variables.email_count + 1>
</cfoutput>
<p></p><cfoutput>#variables.email_count# emails sent # #local_now()#</cfoutput>
Error:
Element EMAIL_COUNT is undefined in VARIABLES.
The error occurred on line

Need to see ColdFusion query params being sent and return data

Newbie to ColdFusion.
I have a script that works for all vendors except one. The script passes a few params and receives a list of claims for the specified vendor with the exception of the vendor previously mentioned.
I'd like to debug one function so I can ensure I'm passing the correct params for this one vendor and also see the response being returned for the same vendor.
What's the best way to debug my script?
Are either of these a good option?
<cfdump var="#VARIABLES#">
<cfdump var="#getPageContext().getBuiltInScopes()#"/>
I'm sure you've all had a case where you had to PROVE it's a database issue and not a script issue.
here's the function
<!--- function getAllRenewalRequestsChrisTest for testing --->
<cffunction name="getAllRenewalRequestsChrisTest" access="public" returnType="Query" hint="">
<cfargument name="Domain" type="String" required="true" hint="Domain for Database Identification.">
<cfargument name="Org_ID" type="Numeric" required="true" hint="Org_Id - Primary Key">
<cfargument name="UserKey" type="Numeric" required="true" hint="UserPK - Primary Key">
<cfset var Local = StructNew()>
<cftry>
<cfset Local.ERXInfo = CreateObject("component","cfc.org.Org").getEprescribeStatus("#Arguments.Domain#","#Arguments.Org_ID#")>
<cfset Local.credentials = StructNew()>
<cfset Local.credentials.PartnerName = "#Local.ERXInfo.eRxPartnerName#">
<cfset Local.credentials.Name = "#Local.ERXInfo.eRxName#">
<cfset Local.credentials.Password = "#Local.ERXInfo.eRxPassword#">
<cfset Local.accountRequest = StructNew()>
<cfset Local.accountRequest.AccountId = "#getEMRDataDSN(Arguments.Domain)#-#Arguments.Org_ID#">
<cfset Local.accountRequest.SiteId = "#Local.ERXInfo.eRxSiteId#">
<cfset Local.wsargs = StructNew()>
<cfset Local.wsargs.timeout = 5>
<cfset Local.objWebService = CreateObject("webservice","#getErxServer(Arguments.Domain)#v7/WebServices/Update1.asmx?WSDL", Local.wsargs)>
<cfset Local.objSearchResponse = Local.objWebService.GetAllRenewalRequestsV2 (Local.credentials, Local.accountRequest, "","")>
<cfset Local.qTemp = QueryNew("DoctorFullName,DrugInfo,ExternalPrescriptionId,ExternalDoctorId,NumberOfRefills,PatientDOB,PatientName,FirstName,LastName,MiddleName,PatientGender,ReceivedTimestamp,RenewalRequestGuid,Quantity,Sig,RenewalRequestMed,EcastPharmacyId,EcastPharmacyName,EcastPharmacyInfo,EcastPharmacyInfoToolTip")>
<cfset Local.renewalRequests = Local.objSearchResponse.getRenewalSummaryArray().getRenewalSummaryV2()>
<cfset Local.objPharmacy = CreateObject("component","cfc.pharmacy")>
<cfloop from="1" to="#ArrayLen(Local.renewalRequests)#" index="Local.indexB">
<cfset QueryAddRow(Local.qTemp)>
<cfset QuerySetCell(Local.qTemp, "DoctorFullName", "#Local.renewalRequests[Local.indexB].getDoctorFullName()#")>
<cfset QuerySetCell(Local.qTemp, "DrugInfo", "#Local.renewalRequests[Local.indexB].getDrugInfo()#")>
<cfset QuerySetCell(Local.qTemp, "ExternalPrescriptionId", "#Local.renewalRequests[Local.indexB].getExternalPrescriptionId()#")>
<cfif Trim(Local.renewalRequests[Local.indexB].getExternalDoctorId()) EQ "">
<cfset QuerySetCell(Local.qTemp, "ExternalDoctorId", "0")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "ExternalDoctorId", "#Trim(Local.renewalRequests[Local.indexB].getExternalDoctorId())#")>
</cfif>
<cfset QuerySetCell(Local.qTemp, "NumberOfRefills", "#Local.renewalRequests[Local.indexB].getNumberOfRefills()#")>
<cfif Len(trim(Local.renewalRequests[Local.indexB].getPatientDOB())) EQ 8>
<cfset QuerySetCell(Local.qTemp, "PatientDOB", "#DateFormat(CreateDate(Left(trim(Local.renewalRequests[Local.indexB].getPatientDOB()), 4), Mid(trim(Local.renewalRequests[Local.indexB].getPatientDOB()), 5, 2), Mid(trim(Local.renewalRequests[Local.indexB].getPatientDOB()), 7, 2)),'mm/dd/yyyy')#")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "PatientDOB", "#Trim(Local.renewalRequests[Local.indexB].getPatientDOB())#")>
</cfif>
<cfset QuerySetCell(Local.qTemp, "PatientName", "#Local.renewalRequests[Local.indexB].getPatientLastName()#, #Local.renewalRequests[Local.indexB].getPatientFirstName()# #Local.renewalRequests[Local.indexB].getPatientMiddleName()#")>
<cfset QuerySetCell(Local.qTemp, "FirstName", "#Local.renewalRequests[Local.indexB].getPatientFirstName()#")>
<cfset QuerySetCell(Local.qTemp, "LastName", "#Local.renewalRequests[Local.indexB].getPatientLastName()#")>
<cfset QuerySetCell(Local.qTemp, "MiddleName", "#Local.renewalRequests[Local.indexB].getPatientMiddleName()#")>
<cfset QuerySetCell(Local.qTemp, "PatientGender", "#UCase(Local.renewalRequests[Local.indexB].getPatientGender())#")>
<cfset Local.tempPharmacyInfo = Local.objPharmacy.getPharmacyInfoByNCPDID(Arguments.Domain,Arguments.Org_ID,Local.renewalRequests[Local.indexB].getNcpdpID(),0)>
<cfif Local.tempPharmacyInfo.recordcount GT 0><!--- non hidden pharmacy already exists--->
<cfset Local.currentPharmacyInfo = Local.objPharmacy.getPharmacyInfoById(Arguments.Domain,Local.tempPharmacyInfo.Pharmacy_Id)>
<cfif Trim(Local.currentPharmacyInfo.PharmacyDisplayName) NEQ "">
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.PharmacyDisplayName)#")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.Pharmacy_Name)#")>
</cfif>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyId", "#Local.currentPharmacyInfo.Pharmacy_Id#")>
<cfelse>
<cfset Local.tempPharmacyInfo = Local.objPharmacy.getPharmacyInfoByNCPDID(Arguments.Domain,Arguments.Org_ID,Local.renewalRequests[Local.indexB].getNcpdpID(),1)>
<cfif Local.tempPharmacyInfo.recordcount GT 0><!--- hidden pharmacy already exists--->
<cfset Local.currentPharmacyInfo = Local.objPharmacy.getPharmacyInfoById(Arguments.Domain,Local.tempPharmacyInfo.Pharmacy_Id)>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyId", "#Local.currentPharmacyInfo.Pharmacy_Id#")>
<cfif Trim(Local.currentPharmacyInfo.PharmacyDisplayName) NEQ "">
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.PharmacyDisplayName)#")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.Pharmacy_Name)#")>
</cfif>
<cfelse> <!--- add pharmacy to org --->
<cfset Local.tempPharmacyInfo = getPharmacyByNCPDID(Arguments.Domain,Arguments.Org_Id,Local.renewalRequests[Local.indexB].getNcpdpID())>
<cfset Local.newPharmacyId = Local.objPharmacy.setPharmacy(Arguments.domain,Arguments.Org_ID,Arguments.UserKey,Local.tempPharmacyInfo.NAME,Local.tempPharmacyInfo.NAME,Local.tempPharmacyInfo.PHONE,Local.tempPharmacyInfo.FAX,Local.tempPharmacyInfo.ADDRESS,Local.tempPharmacyInfo.CITY,Local.tempPharmacyInfo.ZIP,Local.tempPharmacyInfo.STATE,-1,Local.tempPharmacyInfo.NCPDID,Local.tempPharmacyInfo.PHARMACYTYPE,1)>
<cfset Local.currentPharmacyInfo = Local.objPharmacy.getPharmacyInfoById(Arguments.Domain,Local.newPharmacyId)>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyId", "#Local.newPharmacyId#")>
<cfif Trim(Local.currentPharmacyInfo.PharmacyDisplayName) NEQ "">
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.PharmacyDisplayName)#")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyName", "#Trim(Local.currentPharmacyInfo.Pharmacy_Name)#")>
</cfif>
</cfif>
</cfif>
<cfif Trim(Local.currentPharmacyInfo.PharmacyDisplayName) NEQ "">
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyInfoToolTip", "#Trim("Name: #Local.currentPharmacyInfo.PharmacyDisplayName#$SPLIT$Address: #Local.currentPharmacyInfo.Pharmacy_Address# #Local.currentPharmacyInfo.Pharmacy_City# #Local.currentPharmacyInfo.Pharmacy_State# #Local.currentPharmacyInfo.Pharmacy_Zip#$SPLIT$Phone: #Local.currentPharmacyInfo.Pharmacy_Phone#$SPLIT$Fax: #Local.currentPharmacyInfo.Pharmacy_Fax#")#")>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyInfo", "#Trim("#Local.currentPharmacyInfo.PharmacyDisplayName#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Address#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_City#, #Local.currentPharmacyInfo.Pharmacy_State# #Local.currentPharmacyInfo.Pharmacy_Zip#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Phone# (phone)$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Fax# (fax)")#")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyInfoToolTip", "#Trim("Name: #Local.currentPharmacyInfo.Pharmacy_Name#$SPLIT$Address: #Local.currentPharmacyInfo.Pharmacy_Address# #Local.currentPharmacyInfo.Pharmacy_City# #Local.currentPharmacyInfo.Pharmacy_State# #Local.currentPharmacyInfo.Pharmacy_Zip#$SPLIT$Phone: #Local.currentPharmacyInfo.Pharmacy_Phone#$SPLIT$Fax: #Local.currentPharmacyInfo.Pharmacy_Fax#")#")>
<cfset QuerySetCell(Local.qTemp, "EcastPharmacyInfo", "#Trim("#Local.currentPharmacyInfo.Pharmacy_Name#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Address#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_City#, #Local.currentPharmacyInfo.Pharmacy_State# #Local.currentPharmacyInfo.Pharmacy_Zip#$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Phone# (phone)$SPLIT$#Local.currentPharmacyInfo.Pharmacy_Fax# (fax)")#")>
</cfif>
<cfset QuerySetCell(Local.qTemp, "ReceivedTimestamp", "#Local.renewalRequests[Local.indexB].getReceivedTimestamp()#")>
<cfset QuerySetCell(Local.qTemp, "RenewalRequestGuid", "#Local.renewalRequests[Local.indexB].getRenewalRequestGuid()#")>
<cfset QuerySetCell(Local.qTemp, "Quantity", "#Local.renewalRequests[Local.indexB].getQuantity()#")>
<cfset QuerySetCell(Local.qTemp, "Sig", "#Local.renewalRequests[Local.indexB].getSig()#")>
<cfif Trim(Local.renewalRequests[Local.indexB].getQuantity()) NEQ "" AND Trim(Local.renewalRequests[Local.indexB].getSig()) NEQ "">
<cfset QuerySetCell(Local.qTemp, "RenewalRequestMed", "#Local.renewalRequests[Local.indexB].getDrugInfo()# (#Trim(Local.renewalRequests[Local.indexB].getQuantity())#, #Trim(Local.renewalRequests[Local.indexB].getSig())#)")>
<cfelse>
<cfif Trim(Local.renewalRequests[Local.indexB].getQuantity()) NEQ "">
<cfset QuerySetCell(Local.qTemp, "RenewalRequestMed", "#Local.renewalRequests[Local.indexB].getDrugInfo()# (#Trim(Local.renewalRequests[Local.indexB].getQuantity())#)")>
<cfelse>
<cfset QuerySetCell(Local.qTemp, "RenewalRequestMed", "#Local.renewalRequests[Local.indexB].getDrugInfo()# (#Trim(Local.renewalRequests[Local.indexB].getSig())#)")>
</cfif>
</cfif>
</cfloop>
<cfcatch type="Any">
<cfset Local.qTemp = QueryNew("DoctorFullName,DrugInfo,ExternalPrescriptionId,ExternalDoctorId,NumberOfRefills,PatientDOB,PatientName,FirstName,LastName,MiddleName,PatientGender,ReceivedTimestamp,RenewalRequestGuid,Quantity,Sig,RenewalRequestMed,EcastPharmacyId,EcastPharmacyName,EcastPharmacyInfo,EcastPharmacyInfoToolTip")>
</cfcatch>
</cftry>
<cfreturn Local.qTemp>
<cfdump var="getAllRenewalRequestsChrisTest">
</cffunction>
Are your parameters being passed on the form or url scope? Or do you mean that you have several parameters that are being passed into the query?
It sounds like what you want to do is dump the parameters before they get used (or just after they get passed in) in order to see what they are for your problem vendor.
For instance if your parameters are being passed in the form scope, you could dump the form scope first thing in the script which is supposed to perform the query.
<!--- params passed in via form scope --->
<cfdump var="#form#" output="browser" />
<!--- do query --->
<cfquery name="myVendorData" datasource="...">
... SQL which uses the suspect parameters goes here...
</cfquery>
Does that help?
A code sample would go a long way to helping me give you a better answer.
Turn on Debug Output -> Database Activity

Getting "method onRequest was not found" Error when binding CFC in cfselect in CF9. Works fine in CF8

I am getting error saying "Error invoking CFC componentname.cfc : The method onRequest was not found in component ..\filepath\Application.cfc".
This works fine with CF8 but not CF9 with same code. Both environments use Apache and Fusebox 5. The method onRequest exists in application.cfc.
Please help.
CODE FOR CFC BIND:
<cfselect name="officeNum" id="officeNum" bind="cfc: userYODSU.GetOfficeList({empID},{fy})" display="officeNameTxt" value="officeNum" bindOnLoad="true"><option value="">---</option></cfselect>
Code in APPLICATION.CFC
<cfcomponent output="false">
<cfprocessingdirective suppresswhitespace="true">
<!---
Copyright 2006-2007 TeraTech, Inc. http://teratech.com/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--->
<!--- code that must execute at the very start of every single request --->
<!--- FB5: allow "" default - FB41 required this variable: --->
<cfparam name="variables.FUSEBOX_APPLICATION_PATH" default="" />
<!--- FB5: application key - FB41 always uses 'fusebox': --->
<cfparam name="variables.FUSEBOX_APPLICATION_KEY" default="fusebox" />
<!--- FB51: allow application to be included from other directories: --->
<cfparam name="variables.FUSEBOX_CALLER_PATH" default="#replace(getDirectoryFromPath(getBaseTemplatePath()),"\","/","all")#" />
<!--- FB55: easy way to override fusebox.xml parameters programmatically: --->
<cfparam name="variables.FUSEBOX_PARAMETERS" default="#structNew()#" />
<cfparam name="variables.attributes" default="#structNew()#" />
<cfset structAppend(attributes,URL,true) />
<cfset structAppend(attributes,form,true) />
<!--- FB5: uses request.__fusebox for internal tracking of compiler / runtime operations: --->
<cfset request.__fusebox = structNew() />
<!--- FB55: bleeding variables scope back and forth between fusebox5.cfm and this CFC for backward compatibility --->
<cfset variables.exposed = structNew() />
<!--- FB55: scaffolder integration --->
<cfif structKeyExists(attributes,"scaffolding.go")>
<!--- if we're not already executing the scaffolder, branch to it --->
<cfif findNoCase("/scaffolder/",CGI.SCRIPT_NAME) eq 0>
<cftry>
<cfinclude template="/scaffolder/manager.cfm" />
<cfcatch type="missinginclude">
<cfif structKeyExists(attributes,"scaffolding.debug")>
<cfrethrow />
</cfif>
<cfthrow type="fusebox.noScaffolder" message="Scaffolder not found" detail="You requested the scaffolder but /scaffolder/index.cfm does not exist." />
</cfcatch>
</cftry>
</cfif>
</cfif>
<cffunction name="bleed" returntype="any" access="public" output="false">
<cfargument name="outerVariables" type="any" required="true" />
<cfset variables.exposed = arguments.outerVariables />
<!--- expose known variables: --->
<cfset variables.exposed.attributes = variables.attributes />
<cfreturn this />
</cffunction>
<cffunction name="onApplicationStart" output="false">
<!--- FB5: myFusebox is an object but has FB41-compatible public properties --->
<cfset variables.myFusebox = createObject("component","myFusebox").init(variables.FUSEBOX_APPLICATION_KEY,variables.attributes,variables) />
<!--- expose known variables: --->
<cfset variables.exposed.myFusebox = variables.myFusebox />
<!--- FB55: guarantee XFA struct exists --->
<cfparam name="variables.xfa" default="#structNew()#" />
<!--- FB51: ticket 164: add OO synonym for attributes scope --->
<cfparam name="variables.event" default="#createObject('component','fuseboxEvent').init(attributes,xfa,myFusebox)#" />
<!--- expose known variables: --->
<cfset variables.exposed.xfa = variables.xfa />
<cfset variables.exposed.event = variables.event />
<cfset loadFusebox() />
</cffunction>
<cffunction name="onSessionStart" output="false">
</cffunction>
<cffunction name="onRequestStart" output="false">
<cfargument name="targetPage" type="string" required="true" />
<cfset var doCompile = true />
<!--- ensure CFC / Web Service / Flex Remoting calls are not intercepted --->
<cfif right(arguments.targetPage,4) is ".cfc">
<cfset doCompile = false />
<cfset structDelete(variables,"onRequest") />
<cfset structDelete(this,"onRequest") />
</cfif>
<!--- onApplicationStart() may create this (on first request) --->
<cfif not structKeyExists(variables,"myFusebox")>
<!--- FB5: myFusebox is an object but has FB41-compatible public properties --->
<cfset variables.myFusebox = createObject("component","myFusebox").init(variables.FUSEBOX_APPLICATION_KEY,variables.attributes,variables) />
<!--- expose known variables: --->
<cfset variables.exposed.myFusebox = variables.myFusebox />
</cfif>
<!--- FB55: guarantee XFA struct exists --->
<cfparam name="variables.xfa" default="#structNew()#" />
<!--- FB51: ticket 164: add OO synonym for attributes scope --->
<cfparam name="variables.event" default="#createObject('component','fuseboxEvent').init(variables.attributes,variables.xfa,variables.myFusebox)#" />
<!--- expose known variables: --->
<cfset variables.exposed.xfa = variables.xfa />
<cfset variables.exposed.event = variables.event />
<cfif variables.myFusebox.parameters.load>
<cflock name="#application.ApplicationName#_fusebox_#variables.FUSEBOX_APPLICATION_KEY#" type="exclusive" timeout="300">
<cfif variables.myFusebox.parameters.load>
<cfset loadFusebox() />
<cfelse>
<!--- _fba should *not* be exposed --->
<cfset _fba = application[variables.FUSEBOX_APPLICATION_KEY] />
<!--- fix attributes precedence --->
<cfif _fba.precedenceFormOrURL is "URL">
<cfset structAppend(variables.attributes,URL,true) />
</cfif>
<!--- set the default fuseaction if necessary --->
<cfif not structKeyExists(variables.attributes,_fba.fuseactionVariable) or trim(variables.attributes[_fba.fuseactionVariable]) is "">
<cfset variables.attributes[_fba.fuseactionVariable] = _fba.defaultFuseaction />
</cfif>
<cfset variables.attributes[_fba.fuseactionVariable] = trim(variables.attributes[_fba.fuseactionVariable]) />
<cfset variables.attributes.fuseaction = variables.attributes[_fba.fuseactionVariable] />
</cfif>
</cflock>
<cfelse>
<cfset _fba = application[variables.FUSEBOX_APPLICATION_KEY] />
<!--- fix attributes precedence --->
<cfif _fba.precedenceFormOrURL is "URL">
<cfset structAppend(variables.attributes,URL,true) />
</cfif>
<!--- set the default fuseaction if necessary --->
<cfif not structKeyExists(variables.attributes,_fba.fuseactionVariable) or trim(variables.attributes[_fba.fuseactionVariable]) is "">
<cfset variables.attributes[_fba.fuseactionVariable] = _fba.defaultFuseaction />
</cfif>
<cfset variables.attributes[_fba.fuseactionVariable] = trim(variables.attributes[_fba.fuseactionVariable]) />
<cfset variables.attributes.fuseaction = variables.attributes[_fba.fuseactionVariable] />
</cfif>
<!---
Fusebox 4.1 did not set attributes.fuseaction or default the fuseaction variable until
*after* fusebox.init.cfm had run. This made it hard for fusebox.init.cfm to do URL
rewriting. For Fusebox 5, we default the fuseaction variable and set attributes.fuseaction
before fusebox.init.cfm so it can rely on attributes.fuseaction and rewrite that. However,
in order to maintain backward compatibility, we need to allow fusebox.init.cfm to set
attributes[_fba.fuseactionVariable] and still have that reflected in attributes.fuseaction
and for that to actually be the request that gets processed.
--->
<cfif _fba.debug>
<cfset variables.myFusebox.trace("Fusebox","Including fusebox.init.cfm") />
</cfif>
<cftry>
<!--- _fba_ttr_fav and _ba_attr_fa should *not* be exposed --->
<cfset _fba_attr_fav = variables.attributes[_fba.fuseactionVariable] />
<cfset _fba_attr_fa = variables.attributes.fuseaction />
<cfinclude template="#_fba.getCoreToAppRootPath()#fusebox.init.cfm" />
<cfif variables.attributes.fuseaction is not _fba_attr_fa>
<cfif variables.attributes.fuseaction is not variables.attributes[_fba.fuseactionVariable]>
<cfif variables.attributes[_fba.fuseactionVariable] is not _fba_attr_fav>
<!--- inconsistent modification of both variables?!? --->
<cfthrow type="fusebox.inconsistentFuseaction"
message="Inconsistent fuseaction variables"
detail="Both attributes.fuseaction and attributes[{fusebox}.fuseactionVariable] changed in fusebox.init.cfm so Fusebox doesn't know what to do with the values!" />
<cfelse>
<!--- ok, only attributes.fuseaction changed --->
<cfset variables.attributes[_fba.fuseactionVariable] = variables.attributes.fuseaction />
</cfif>
<cfelse>
<!--- ok, they were both changed and they match --->
</cfif>
<cfelse>
<!--- attributes.fuseaction did not change --->
<cfif variables.attributes[_fba.fuseactionVariable] is not _fba_attr_fav>
<!--- make attributes.fuseaction match the other changed variable --->
<cfset variables.attributes.fuseaction = variables.attributes[_fba.fuseactionVariable] />
<cfelse>
<!--- ok, neither variable changed --->
</cfif>
</cfif>
<cfcatch type="missinginclude" />
</cftry>
<cfif doCompile>
<!---
must special case development-circuit-load mode since it causes circuits to reload during
the compile (post-load) phase and therefore must be exclusive
--->
<cfif _fba.debug>
<cfset variables.myFusebox.trace("Fusebox","Compiling requested fuseaction '#variables.attributes.fuseaction#'") />
</cfif>
<!--- _parsedFileData should *not* be exposed --->
<cfif _fba.mode is "development-circuit-load">
<cflock name="#application.ApplicationName#_fusebox_#variables.FUSEBOX_APPLICATION_KEY#" type="exclusive" timeout="300">
<cfset _parsedFileData = _fba.compileRequest(attributes.fuseaction,myFusebox) />
</cflock>
<cfelse>
<cflock name="#application.ApplicationName#_fusebox_#variables.FUSEBOX_APPLICATION_KEY#" type="readonly" timeout="300">
<cfset _parsedFileData = _fba.compileRequest(attributes.fuseaction,myFusebox) />
</cflock>
</cfif>
</cfif>
</cffunction>
<!--- excuse the formatting here - it is done to completely suppress whitespace --->
<cffunction name="onRequest"><cfargument
name="targetPage" type="string" required="true" /><cfsetting
enablecfoutputonly="true">
<cfif variables.myFusebox.parameters.execute>
<cfif _fba.debug>
<cfset myFusebox.trace("Fusebox","Including parsed file for '#variables.attributes.fuseaction#'") />
</cfif>
<cftry>
<!---
readonly lock protects against including the parsed file while
another threading is writing it...
--->
<cflock name="#_parsedFileData.lockName#" type="readonly" timeout="30">
<cfinclude template="#_parsedFileData.parsedFile#" />
</cflock>
<cfcatch type="missinginclude">
<cfif right(cfcatch.missingFileName, len(_parsedFileData.parsedName)) is _parsedFileData.parsedName>
<cfthrow type="fusebox.missingParsedFile"
message="Parsed File or Directory not found."
detail="Attempting to execute the parsed file '#_parsedFileData.parsedName#' threw an error. This can occur if the parsed file does not exist in the parsed directory or if the parsed directory itself is missing." />
<cfelse>
<cfrethrow />
</cfif>
</cfcatch>
</cftry>
</cfif>
<cfsetting enablecfoutputonly="false">
</cffunction>
<cffunction name="onRequestEnd" output="true">
<cfargument name="targetPage" type="string" required="true" />
<cfif structKeyExists(variables,"myFusebox")>
<cfset variables.myFusebox.trace("Fusebox","Request completed") />
</cfif>
<cfif isDefined("_fba.debug") and _fba.debug and structKeyExists(variables,"myFusebox") and right(arguments.targetPage,4) is not ".cfc">
<cfoutput>#variables.myFusebox.renderTrace()#</cfoutput>
</cfif>
</cffunction>
<cffunction name="onSessionEnd" output="false">
</cffunction>
<cffunction name="onApplicationEnd" output="false">
</cffunction>
<cffunction name="onError">
<cfargument name="exception" />
<cfset var stack = 0 />
<cfset var prefix = "Raised at " />
<!--- top-level exception is always event name / expression for Application.cfc (but not fusebox5.cfm) --->
<cfset var caughtException = arguments.exception />
<cfif structKeyExists(caughtException,"rootcause")>
<cfset caughtException = caughtException.rootcause />
</cfif>
<cfif listFirst(caughtException.type,".") is "fusebox">
<cfif isDefined("_fba.debug") and _fba.debug and structKeyExists(variables,"myFusebox")>
<cfset variables.myFusebox.trace("Fusebox","Caught Fusebox exception '#caughtException.type#'") />
<cfif structKeyExists(caughtException,"tagcontext")>
<cfloop index="stack" from="1" to="#arrayLen(caughtException.tagContext)#">
<cfset variables.myFusebox.trace("Fusebox",prefix &
caughtException.tagContext[stack].template & ":" &
caughtException.tagContext[stack].line) />
<cfset prefix = "Called from " />
</cfloop>
</cfif>
</cfif>
<cfif not isDefined("_fba.errortemplatesPath") or (
structKeyExists(variables,"attributes") and structKeyExists(variables,"myFusebox") and
not _fba.handleFuseboxException(caughtException,variables.attributes,variables.myFusebox,variables.FUSEBOX_APPLICATION_KEY)
)>
<cfif isDefined("_fba.debug") and _fba.debug and structKeyExists(variables,"myFusebox")>
<cfoutput>#variables.myFusebox.renderTrace()#</cfoutput>
</cfif>
<cfthrow object="#caughtException#" />
</cfif>
<cfelse>
<cfif isDefined("_fba.debug") and _fba.debug and structKeyExists(variables,"myFusebox")>
<cfset variables.myFusebox.trace("Fusebox","Request failed with exception '#caughtException.type#' (#caughtException.message#)") />
<cfif structKeyExists(caughtException,"tagcontext")>
<cfloop index="stack" from="1" to="#arrayLen(caughtException.tagContext)#">
<cfset variables.myFusebox.trace("Fusebox",prefix &
caughtException.tagContext[stack].template & ":" &
caughtException.tagContext[stack].line) />
<cfset prefix = "Called from " />
</cfloop>
</cfif>
<cfoutput>#variables.myFusebox.renderTrace()#</cfoutput>
</cfif>
<cfthrow object="#caughtException#" />
</cfif>
<!--- if we hit an error before starting the request, prevent the request from running --->
<cfset myFusebox.parameters.execute = false />
</cffunction>
<cffunction name="override" returntype="void" access="public" output="false">
<cfargument name="name" type="string" required="true" />
<cfargument name="value" type="any" required="true" />
<cfargument name="useThisScope" type="boolean" default="false" />
<cfif arguments.useThisScope>
<cfset this[arguments.name] = arguments.value />
<cfelse>
<cfset variables[arguments.name] = arguments.value />
</cfif>
</cffunction>
<cffunction name="onFuseboxApplicationStart">
</cffunction>
<cffunction name="loadFusebox" access="private" output="false">
<!--- ticket 232: extend request timeout value on framework load --->
<cfsetting requesttimeout="600" />
<cfif not structKeyExists(application,variables.FUSEBOX_APPLICATION_KEY) or variables.myFusebox.parameters.userProvidedLoadParameter>
<!--- can't be conditional: we don't know the state of the debug flag yet --->
<cfset variables.myFusebox.trace("Fusebox","Creating Fusebox application object") />
<cfset _fba = createObject("component","fuseboxApplication") />
<cfset application[variables.FUSEBOX_APPLICATION_KEY] = _fba.init(variables.FUSEBOX_APPLICATION_KEY,variables.FUSEBOX_APPLICATION_PATH,variables.myFusebox,variables.FUSEBOX_CALLER_PATH,variables.FUSEBOX_PARAMETERS) />
<cfelse>
<!--- can't be conditional: we don't know the state of the debug flag yet --->
<cfset variables.myFusebox.trace("Fusebox","Reloading Fusebox application object") />
<cfset _fba = application[variables.FUSEBOX_APPLICATION_KEY] />
<!--- it exists and the load is implicit, not explicit (via user) so just reload XML --->
<cfset _fba.reload(variables.FUSEBOX_APPLICATION_KEY,variables.FUSEBOX_APPLICATION_PATH,variables.myFusebox,variables.FUSEBOX_PARAMETERS) />
</cfif>
<!--- fix attributes precedence --->
<cfif _fba.precedenceFormOrURL is "URL">
<cfset structAppend(variables.attributes,URL,true) />
</cfif>
<!--- set the default fuseaction if necessary --->
<cfif not structKeyExists(variables.attributes,_fba.fuseactionVariable) or variables.attributes[_fba.fuseactionVariable] is "">
<cfset variables.attributes[_fba.fuseactionVariable] = _fba.defaultFuseaction />
</cfif>
<!--- set this up for fusebox.appinit.cfm --->
<cfset variables.attributes.fuseaction = variables.attributes[_fba.fuseactionVariable] />
<!--- flag this as the first request for the application --->
<cfset variables.myFusebox.applicationStart = true />
<!--- force parse after reload for consistency in development modes --->
<cfif _fba.mode is not "production" or variables.myFusebox.parameters.userProvidedLoadParameter>
<cfset variables.myFusebox.parameters.parse = true />
</cfif>
<!--- need all of the above set before we attempt any compiles! --->
<cfif variables.myFusebox.parameters.parseall>
<cfset _fba.compileAll(variables.myFusebox) />
</cfif>
<!--- FB55: template method to allow no-XML application initialization --->
<cfif _fba.debug>
<cfset variables.myFusebox.trace("Fusebox","Executing onFuseboxApplicationStart()") />
</cfif>
<cfset onFuseboxApplicationStart() />
<!--- FB5: new appinit include file --->
<cfif _fba.debug>
<cfset variables.myFusebox.trace("Fusebox","Including fusebox.appinit.cfm") />
</cfif>
<cftry>
<cfinclude template="#_fba.getCoreToAppRootPath()#fusebox.appinit.cfm" />
<cfcatch type="missinginclude" />
</cftry>
<!--- ticket 269 ensure there is no double reload at CF startup --->
<cfset variables.myFusebox.parameters.load = false />
</cffunction>
</cfprocessingdirective>
</cfcomponent>
I dunno why you'd be getting the error you're seeing, but in CF9 you don't need to do all that horsing around deleting onRequest(), you can simply have an onCfcRequest() method in there, which'll get called instead of onRequest() when requests for CFCs are made. So doing that could remove the situation in which the error situation arises.
Finally I was able to resolve this issue. I figured that the error shows only in the localhost but not on any servers. Also, found that the problem was only with the cfselect with bind cfc. I didn't see any difference with the settings in localhost and other servers. So I tried some changes to the fusebox code and fixed it. Following change in fusebox5.cfm made it working.
<cftry>
<cfset __fuseboxAppCfc.onRequest(CGI.SCRIPT_NAME) />
<cfset __fuseboxAppCfc.onRequestEnd(CGI.SCRIPT_NAME) />
<cfcatch type="any">
<cfset __fuseboxAppCfc.onError(cfcatch)>
</cfcatch>
</cftry>
Changed this to:
<cftry>
<cfif right(CGI.SCRIPT_NAME,"4") NEQ ".cfc">
<cfset __fuseboxAppCfc.onRequest(CGI.SCRIPT_NAME) />
</cfif>
<cfset __fuseboxAppCfc.onRequestEnd(CGI.SCRIPT_NAME) />
<cfcatch type="any">
<cfset __fuseboxAppCfc.onError(cfcatch)>
</cfcatch>
</cftry>