• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

The getBuiltInScopes method was not found

Participant ,
Sep 25, 2014 Sep 25, 2014

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.

Views

3.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Oct 07, 2014 Oct 07, 2014

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.

Votes

Translate

Translate
Participant ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

Closer.  That gives me the datasource problem I'm working with...   Since that is what it is on production, I will leave it like it is and hope this fixes it.    I believe my contact has gone for the day, so not much more can be done.   Thank you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

What is the datasource problem? Do you get an error message? Does it point to a line number and page? If there is a datasource error in Application.cfc, then I could have a look at the file for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

Again, the datasource problem? The error message? Line number and page?

The code you sent is that of an Application.cfm file, rather than Application.cfc. In any case, it contains no communication with the database.

I made some corrections. They are in italics.

<!--- Added default applicationTimeout of 2 days --->

<cfapplication

name = "XXXTransfer"

applicationTimeout ="#CreateTimeSpan(2,0,0,0)#"

clientmanagement = "yes"

sessionmanagement = "yes"

setClientCookies = "Yes"

sessiontimeout="#CreateTimeSpan(0,0,45,0)#">

<!--- Unnecessary. Why set variables that Coldfusion already knows? --->

<!---

<cfset session.cfid = cfid>

  <cfset session.cftoken = cftoken>

  <cfset session.urltoken = "cfid=#session.cfid#&cftoken=#session.cftoken#">

--->

  <cfset authfileroot="E:\XXX_Prod\secure\Authorization\">

<cflock scope="SESSION" type="exclusive" timeout="5">

<cfset COOKIE.CFID = SESSION.CFID>

<cfset COOKIE.CFTOKEN = SESSION.CFTOKEN>

</cflock>

<cfset datasource="XXXXTest">    <!--- ((((( OR Prod --->

<cfset fileroot="E:\XXX_Prod\secure\Requirement\">

<!--- <cfset authfileroot="E:\XXX_Prod\secure\Authorization\"> ---><!--- Repeated line --->

<cfset myCGI="#CGI.PATH_INFO#">

<cfset sessions.CurrentXXXFY=2012>

<!--- check to see that anyone who gets here is authenticated --->

<cfscript>

function path_index()

{

var pos = findNoCase ("", CGI.PATH_INFO);

var path = left(CGI.PATH_INFO, pos+0);

return path;

}

function path_file()

{

var pos = findNoCase ("\secure\", CGI.PATH_TRANSLATED, 5);

var path = left (CGI.PATH_TRANSLATED, pos+7);

path = insert ("tmp\", path, len(path));

return path;

}

</cfscript>

<cfif not IsDefined("session.SecureUserID")>

      <cfif ListLast(CGI.SCRIPT_NAME, "/") NEQ "doUserLogin.cfm">

          <CFOUTPUT>

<!--- Added Javascript type attribute --->

       <SCRIPT LANGUAGE="JavaScript" type="text/javascript">

        top.document.location="#path_index()#index.cfm?sessionExpire=yes"

        </SCRIPT>

        </CFOUTPUT>

      </cfif>

<cfelseif session.SecureUserID is "">

      <CFOUTPUT>

    <SCRIPT LANGUAGE="JavaScript" type="text/javascript">

    top.document.location="#path_index()#index.cfm?logout=yes"

    </SCRIPT>

    </CFOUTPUT>

</cfif>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

The error message is:

Datasource XXXXProd could not be found.  (Yes, because it's on the Test server)


The error occurred in //xxxxx002/TestProdMX/Sites/XXX/IE/XXXX/secure/Application.cfc: line 126

124 :          </cfoutput>

125 :        </cfsavecontent>

126 :         <cfquery name="getID" datasource="#application.datasource#">

127 :             SELECT ERR_SEQ.NEXTVAL AS newID FROM dual

128 :          </cfquery>

I guess it got truncated...   Thanx for the input.   I will make those changes, but I really want to see if this getBuiltInScopes thing is solved when I move this over to Production, where the error exists.  After I solve this and get the customer off my back, then I will make changes and move it to Test where I can play with it.   Thank you so much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

Are you sure you're not dealing with two files Application.cfm and Application.cfc?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

There are two there, but the one I was sent from Production is .cfc   The .cfm hasn't been updated since February.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

The code you sent me is .CFM instead. I know because CFM is the one that has <cfapplication>. You could send me Application.cfc by private message.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

I just sent it via PM.   Not sure how I mixed the two up....   I guess I need to take it down.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

No need to worry. The code you have shown the forum so far is arbitrary and harmless.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 02, 2014 Oct 02, 2014

Copy link to clipboard

Copied

Did you get the PM with the "correct" version?  Not sure what I did.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

The likely reason you are getting the datasource error is because the datasource name on the Test server is different from that on Production. Given that the code on Production is

<cfset application.datasource="XXXXProd">

then the likely equivalent on Test would be

<cfset application.datasource="XXXXTest">

Make this change on the Test server, and see whether it resolves the issue. Again, I would advise you to delete your earlier post containing your Application.cfc code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Yes, I understand that.  My current issue is, I have never had to change datasource....  then again, I've never had to work with Application.cfc since I've been here.   Once up FTP to test, I don't have control over it.  I suppose I could upload with datasource=Test, try it out, then if successful, change it to Production and upload again for transfer.   That's probably the way it was done.   Thank you for all your help.

BTW, deleted the post with all the code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

LouieWarren wrote:

My current issue is, I have never had to change datasource..

I suspect that all you have to do is to modify the code that points to the datasource. As I said earlier, it is likely to be

<cfset application.datasource="XXXXProd">

for the Production server and

<cfset application.datasource="XXXXTest">

for the Test server. This would explain why the first line gives an error on the Test server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

That is what I meant.   Change the code to Test, upload, test.  Then change the code to Prod, upload, request movement to Production.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

OK. I get it now.

Oh, and after you succeed, which you of course will, could you please share your final thoughts with us, and mark this thread as answered. Your experience will certainly help someone else in future.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Well, I changed it and uploaded.  It's still holding on to the Production value.   I did the trick to reset stuff... still not working.  Beyond frustrated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

I am assuming you have uploaded to your Test environment, with the overwrite option turned on. After that, you have to restart Coldfusion.

There was one thing I ad to ask you to start with. What is the name of the datasource on the Test server, that corresponds to the Production server's XXXXProd? To answer this question, simply open the Coldfusion Administrator of the Test server and look at the datasource page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Yes, I overwrote it.   I have no access to the CF server to restart or CF Admin.  I have to depend on the gov't SysAdmin to do everything.   Since there are 20 other applications on there, they are reluctant to do anything that could effect the other users.   I am going to see if the SysAdmin will move the modified code to Production and then, if it blows up, restore the original file.   That's all I can do at this point.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

It should work. The key was to comment out the code block involving getBuiltInScopes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

It did work.  It got rid of the getBuiltInScopes error and gives me now this lovely error:

XXX has experienced an error. XXX Administrators have been notified and will coordinate with you in resolving the error.

Error 1286 - Event handler exception.

The error number means nothing, that I can find.  Every time I attempt the task, the error number increments.   Not sure where to go on this one.   Just start searching the code, I guess.

I have requested a copy of the logs for today.  Hopefully that will give me more info.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

Well...  the error isn't displayed any more, but the log definitely has it...

"Error","ajp-bio-8012-exec-284","10/03/14","12:40:38","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: \\xxxxx002\ProdData\Sites\xxx\IE\XXXX\secure\Authorization\FundingRequestForm_Action.cfm, line: 113 "

Line 113 is

document.form1.actiontaken.value = "approve"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

LouieWarren wrote:

Well...  the error isn't displayed any more, but the log definitely has it...

Perhaps an old entry, before you made the change?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

LouieWarren wrote:

It did work.  It got rid of the getBuiltInScopes error and gives me now this lovely error:

XXX has experienced an error. XXX Administrators have been notified and will coordinate with you in resolving the error.

Error 1286 - Event handler exception.

The error number means nothing, that I can find.  Every time I attempt the task, the error number increments.   Not sure where to go on this one. 

Error 1286 may refer to a well-known error in the MySQL database: corrupt InnoDB files. If so, then this has nothing to do with Coldfusion.

You have gone far and beyond the call of duty. My advice to you now is to bring in an experienced Coldfusion Developer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

I verified the timestamp and it's correct...   right around the time I tried.   The SysAdmin is gone now, so I can't get any more logs until Monday.   I will continue to try and figure out what is happening and assume you are correct and that was an old record...  I doubt it, but it is possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 03, 2014 Oct 03, 2014

Copy link to clipboard

Copied

We are using Oracle 11g.  The error number will be 1 more each time I make it happen.

Thank you for thinking so, but I am supposed to make this work.  Getting an experienced ColdFusion Developer is going to be HR's call.  I have a meeting with our CEO on Monday to review what's going down.  I've been telling these people for a year, my CF skills were weak and that I've been mostly a DBA since 1987...  Oracle since the late 90s and since.   I still have to fix it,   Hopefully I can make some progress in figuring it out with what remains of the day.   Thank you for all your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation