Copy link to clipboard
Copied
I have an application that has worked for quite a while. I have made no changes to the code since the last time I used it. Basically, the code creates a zip file with input for an involved report. I used it in March of this year it worked fine. I've been assured by the gov't sysadmins and DBAs that nothing has changed, but I still get the attached error. Any ideas? I have just heard from a friend who knows CF, that it could be a version issue. I am currently running 8 and I believe he is running 10. If this is an issue, is the solution somewhere on this site? I do minimal CF and am at a loss. The function that is throwing the error is when a button is clicked, a javascript routine is run which combines all the files requred for the zip file. Yesterday, another application started throwing the error. I haven't been through the code yet, but it is another button being clicked, and I'm sure, another javascript error. |
getBultInScopes() is a ColdFusion 8 procedure... getCFScopes() is the current call. My problem was, there was a special debug module that had the call and I could find it nowhere else. Finally refreshed my Application.cfc from Production and found a call to getBuiltInScopes() there that wasn't in the module I had. Commented that section out and the error disappeared. Thank you all for your assistance.
Copy link to clipboard
Copied
The functionality getPageContext().getBuiltInScopes() was only implied. Adobe has removed it. Search your code for the function and replace it with getPageContext().getCFScopes().
Copy link to clipboard
Copied
Yes,, I found that yesterday and did just that. I promoted it to Production and am still getting the same error. In my search, I only found one place where the getBuiltInScopes shows up...
Copy link to clipboard
Copied
Check the stack trace that comes with the error message. It should point you to the location of the error.
Copy link to clipboard
Copied
As I said, I'm an Oracle DBA with limited CF knowledge... how do I do that? Sorry to be dense.
Copy link to clipboard
Copied
No trouble at all. What IDE is your CF code developed in: CFEclipse or CFBuilder? Using either, you could search the entire code base.
Copy link to clipboard
Copied
I have no idea and the former company is rather tight lipped. I use Microsoft Expression Web 4 currently.
Copy link to clipboard
Copied
Microsoft Expression Web 4 is a text editor, so you can use it to search your code's root directory for the expression getBuiltInScopes().
Copy link to clipboard
Copied
I did that. It showed one .cfm file with that statement. I changed getBuiltInScopes() to getCFScopes() and it still gives the same error.
Copy link to clipboard
Copied
OK. In that case, I suspect you will have to restart the Coldfusion server for the changes to take effect.
Copy link to clipboard
Copied
Our posts crossed each other on the wire. So, there you have it, Louie: 2 posts saying the same thing!
Copy link to clipboard
Copied
I have requested that the government SysAdmin do so. It really sucks not being in control of something I support. Thank you all for your help.
Copy link to clipboard
Copied
I have this to say, without any intention of being condescending. You are on your way to solving a Coldfusion issue, which is quite good going.
Copy link to clipboard
Copied
Considering the little I know, I take that as a compliment.
Copy link to clipboard
Copied
BTW, the SysAdmin cleared the cache and cannot restart the server during normal 1st shift. Clearing cache did nothing; same error. I restarted my browsers (sometimes IE works and sometimes Firefox works); no change in either. Luckily, the "emergency" has been downgraded... but I still need to fix the thing. This CF education by fire isn't my favorite way of learning, but... thank you all again.
Copy link to clipboard
Copied
The SysAdmin sent me the application log: Since it is a government site, I changed identifying things to XXXX or xxxx.
"Error","ajp-bio-8012-exec-2091","09/26/14","11:43:33","XXXXransfer3","The getBuiltInScopes method was not found.Either there are no methods with the specified method name and argument types or the getBuiltInScopes method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity. The specific sequence of files included or processed is: \\haffs002\ProdData\Sites\xxx\IE\XXXX\secure\Authorization\FundingRequestForm_Action.cfm, line: 113 "
Line 113 is: document.form1.actiontaken.value = "approve"
The user clicks on a button to Approve or Disapprove a request. This causes another screen to be displayed. The error is happening before the 2nd screen is displayed.
Copy link to clipboard
Copied
LouieWarren wrote:
Line 113 is: document.form1.actiontaken.value = "approve"
This looks like Javascript, and so is unlikely to be the cause. However, something about the page FundingRequestForm_Action.cfm is responsible for the error. So, search the page for the word getBuiltInScopes.
If you find nothing, search the application file (Application.cfm or Application.cfc) for the same word. If you find it, replace it with getCFScopes.
Copy link to clipboard
Copied
Nothing in either Application.cfm or cfc. The word scope comes up:
<cflock scope = "Session" timeout = "5" type = "Exclusive"> |
Nothing else.
Copy link to clipboard
Copied
LouieWarren wrote:
BTW, the SysAdmin cleared the cache and cannot restart the server during normal 1st shift. Clearing cache did nothing; same error.
Then some Coldfusion code is indeed still calling the method getBuiltInScopes. Let us debug it together.
Copy link to clipboard
Copied
I've done a search of all the code with AstroGrep. Other than the one catch all module that is called at login, I cannot find any other instance.
Copy link to clipboard
Copied
Ok. On which page was the one catch?
Copy link to clipboard
Copied
Application.cfc
Copy link to clipboard
Copied
Could you show me the line where you found getBuiltInScopes - by private mail if necessary.
Copy link to clipboard
Copied
<cfdump var="#getPageContext().getcfScopes()#"/>
This is what it looks like now.
Copy link to clipboard
Copied
From the information you have given, it now seems more likely than ever that your application is using a cached copy of Application.cfc. It is also apparent that, for whatever reason, the Developers ignored best-practice.
It is best-practice to avoid outputs, display or dumps in Application.cfc. In fact, I would suggest you comment out the cfdump line, to disable it, unless you have a crucial reason for running it. You may disable it as follows:
<!--- <cfdump var="#getPageContext().getcfScopes()#"/> --->
Assuming the cache hypothesis is true, then you should restart Coldfusion.