Highlighted

The getBuiltInScopes method was not found

Participant ,
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.

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.

Views

1.7K

Likes

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

The getBuiltInScopes method was not found

Participant ,
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.

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.

Views

1.7K

Likes

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
Sep 25, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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().

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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... 

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

Copy link to clipboard

Copied

I have no idea and the former company is rather tight lipped.   I use Microsoft Expression Web 4 currently.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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().

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Engaged ,
Sep 26, 2014

Copy link to clipboard

Copied

My guess is that your production server has template cache enabled.  So, your change and production deploy won't be seen until you go into the ColdFusion administrator and clear the cache.  Alternatively, you could just restart CF.

Likes

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
Reply
Loading...
Sep 26, 2014 1
Adobe Community Professional ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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!

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 1
Participant ,
Sep 26, 2014

Copy link to clipboard

Copied

Considering the little I know, I take that as a compliment.   

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Participant ,
Sep 26, 2014

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.

Likes

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
Reply
Loading...
Sep 26, 2014 0
Adobe Community Professional ,
Sep 27, 2014

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.

Likes

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
Reply
Loading...
Sep 27, 2014 0
Adobe Community Professional ,
Sep 27, 2014

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.

Likes

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
Reply
Loading...
Sep 27, 2014 0
Participant ,
Sep 29, 2014

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.

Likes

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
Reply
Loading...
Sep 29, 2014 0
Participant ,
Sep 29, 2014

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.

Likes

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
Reply
Loading...
Sep 29, 2014 0
Adobe Community Professional ,
Sep 29, 2014

Copy link to clipboard

Copied

Ok. On which page was the one catch?

Likes

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
Reply
Loading...
Sep 29, 2014 0
Participant ,
Sep 29, 2014

Copy link to clipboard

Copied

Application.cfc

Likes

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
Reply
Loading...
Sep 29, 2014 0
Adobe Community Professional ,
Sep 29, 2014

Copy link to clipboard

Copied

Could you show me the line where you found getBuiltInScopes - by private mail if necessary.

Likes

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
Reply
Loading...
Sep 29, 2014 0
Participant ,
Sep 30, 2014

Copy link to clipboard

Copied

<cfdump var="#getPageContext().getcfScopes()#"/> 

This is what it looks like now.

Likes

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
Reply
Loading...
Sep 30, 2014 0
Adobe Community Professional ,
Sep 30, 2014

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.

Likes

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
Reply
Loading...
Sep 30, 2014 0
Participant ,
Sep 30, 2014

Copy link to clipboard

Copied

I just commented it out and moved it up for the SysAdmin to move.   I asked him to clear cache again... if that doesn't do anything, I'll request another restart in the morning.

Best practice... I'm sure it's not.  I know very little CF and less Java...  I am trying to get someone in here (my work)  that knows more than I do to review this code and tell me what needs to be fixed.

Likes

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
Reply
Loading...
Sep 30, 2014 0
Participant ,
Sep 30, 2014

Copy link to clipboard

Copied

Since I have discovered (for my own knowledge) getBuiltInScopes() vs getCFScopes()...   is there anything else like that out there?   The application I inherited, was written with ColdFusion 8 and the Production server is now up to CF10.    A bunch of errors, similar to this, have popped up recently without me doing anything to the code.  I am assuming the SysAdmin on the production system did an update or patch and some of this older stuff is not compatible...   I really need to solve this error and any other related.   Thank you.

Likes

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
Reply
Loading...
Sep 30, 2014 0
Adobe Community Professional ,
Oct 01, 2014

Copy link to clipboard

Copied

Your concerns are justified. The issue may turn out to have consequences. The error stops Coldfusion processing the page further. However, the user who pressed on the button to approve or disapprove apparently did so for a reason.

Bring any errors you may have to the forum. We shall be glad to discuss them with you. Good luck.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

Indeed.  They use this to approve or disapprove a request.  Now they have a work stoppage and I have no idea how to fix it.    The reboot after the commenting the code out in the ONLY place the getBuiltInScopes is listed in the entire application, did nothing.  I still get the same error.   How can the getBuiltInScopes error still show up if I changed it to getCFScopes and then finally, commented it out?  This is truly maddening.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Adobe Community Professional ,
Oct 01, 2014

Copy link to clipboard

Copied

Sorry to hear that, LouieWarren. There is every likelihood that the code getPageContext().getBuiltInScopes() is still active.


Given the changes you have already made, there is a quick test we can do. Open the file C:\ColdFusion8\logs\Exception.log in a text editor.


Locate the error in the text, and all the information that immediately follows. Copy-paste the stack trace (that is, all the information pertaining to the error) and send it to me by private message. 

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

The Production server is at the customer site.   I do not have access to it.   I will see if the SysAdmin can send me the log, but they are at CF10.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Adobe Community Professional ,
Oct 01, 2014

Copy link to clipboard

Copied

You have my sympathy. I have had to play this wait-for-em-to-pass-the-parcel game myself. Excruciating, sometimes.

The location of the file on CF10 is CF_installation_directory/cfusion/logs/Exception.log (making allowances for Windows or Linux). Let us hope they share your sense of urgency.


Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

He's already refused to reboot/refresh cache for me again after last night.   He says he has 20 other CF users on that box and no one asks for such things.   My customer is going bats*** and being a CF/Java novice, it's really frustrating.  If I didn't have the help that you've provided, I don't know what I would have done.  Thank you.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Engaged ,
Oct 01, 2014

Copy link to clipboard

Copied

Said it before.. I'll say it again.  There is some form of caching going on that is causing your issue.  If you have indeed removed the code and pushed it into production then the problem is on the server.  They more than likely have save class files enabled so even if they restart or clear cache the files will remain.  They can safely delete the files without restarting CF to clear them.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

"Error","ajp-bio-8012-exec-13","10/01/14","08:52:26","XXXTransfer3","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: \\xxxx002\ProdData\Sites\xxx\IEXXXX\secure\Authorization\FundingRequestForm_Action.cfm, line: 113 "

coldfusion.runtime.java.MethodSelectionException: The getBuiltInScopes method was not found.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

Sorry to be dense, but what would I tell them to delete?

Likes

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
Reply
Loading...
Oct 01, 2014 0
Engaged ,
Oct 01, 2014

Copy link to clipboard

Copied

Just delete all the files in the cfclasses folder that is in {cfhome}/cfusion/wwwroot/WEB-INF/cfclasses/

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

Doubt they'll do that, but I will try.  Thank you.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

As suspected, they won't do it.   To quote him:

"I don't know the effect of deleting the class files so I will not delete the class file." 

I doubt I can convince him otherwise.  They have 20 other customers on that box and I'm just one little application.  Do these file expire and go away?  I doubt they have set up unlimited space to store them.

Likes

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
Reply
Loading...
Oct 01, 2014 0
Participant ,
Oct 01, 2014

Copy link to clipboard

Copied

Is there anything else I can do, to the code, or anything in my control, to figure out what is up?   I am once again, stumped.  My CF skills are a bit more than regular HTML...  I use Expression Web 4 to check the code and may not always follow things correctly. There are numerous calls to getPageContext(), but only one to getBuiltInScopes (or the replacement getCFScopes), would tracing down each call help any?   It's severely frustrating when you are "in charge" of something, but have to depend on someone else because policy says you can't touch it.  

Likes

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
Reply
Loading...
Oct 01, 2014 0
Adobe Community Professional ,
Oct 02, 2014

Copy link to clipboard

Copied

1) Confirm that all parties are using exactly the same copy of the Coldfusion code.

2) Copy the entire code into a directory, say, testDir.

3) Install a search tool, like Wingrep, and use it to search testDir for the string getBuiltInScopes. 

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

I am the starting point for all code for this application.   When I took over, I copied everything on the FTP site (Test & Production are copies of this) to my laptop.  I have done AstroGrep searching for getBuiltInScopes and found the one instance.  I changed it to getCFScopes()... no change.   I commented it out... no change.   Will WinGrep give me different results?  Thanx.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Adobe Community Professional ,
Oct 02, 2014

Copy link to clipboard

Copied

LouieWarren wrote:

I am the starting point for all code for this application.   When I took over, I copied everything on the FTP site (Test & Production are copies of this) to my laptop.  I have done AstroGrep searching for getBuiltInScopes and found the one instance.  I changed it to getCFScopes()... no change.   I commented it out... no change.

The great fictional detective, Sherlock Holmes, said, "When you have eliminated the impossible, whatever remains, however improbable, must be the truth". This leaves us with one option that has made the rounds before. The inevitable conclusion is that, each time you make a change, the code that Coldfusion runs is different from the one you have modified.

We have mentioned caching as a possible cause. Another common source of error is saving the edited file with the wrong extension, usually as TXT instead of CFM or CFC.

There is a test you could do that is less drastic than clearing the class files. At least, it sounds less drastic. In Application.cfc, temporarily change the name of the application.

You can do it as follows. Locate the line that is equivalent to

this.name = "someName"

Change that to

this.name = "someName2"

The new name will force Coldfusion to compile the files into new classes. However, beware! Doing this will reset your whole application, ending current sessions and starting new ones. So, I would highly recommend you do it on a test server, not on production.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

Well, now I've screwed it up.   Production is the only place it was happening.  My customer isn't savvy enough to recreate the issue on Test and neither am I.  I changed the name, as mentioned, and moved the file over.  Well, for the 1st time since I've been here, it appears I had to change the datasource.  Never done it.  I assumed the SysAdmin did it.   Now my application is hosed because it's looking for test.  I changed the datasource and he moved it over again, but it didn't work.   I'm having him restore the file from back up to the way it was this morning before I did this.   I really hate this crap.  Yes, I know you warned me.

Now that I've calmed down slightly...  since the this.name line is above the datasource line, the reset should have happened. or would it have to have completely loaded?  Just anticipating my next move when they restore Application.cfc from the last backup.  It hadn't been changed since 2013, so it should be the same as it was.   Just like cellophane toilet paper...   it may do the job, but makes a bigger mess in the process.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

Well, the file was restored and the error is back as it was.   I am having them get me a copy of the file so I can compare to what I uploaded...   Insanity...

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

Found this: http://www.bennadel.com/blog/673-force-coldfusion-server-to-recompile-a-coldfusion-template.htm

Basically it says I can add comments or something to the checkall.cfm file that contained the original getBuiltInScopes error and it will do what you described I do in Application.cfc?   Maybe I'm reading what I want to hear.  The two application files (my copy and the actual one on Production) are so different, I don't know, quickly, what to do.    More confused than ever.

While trying to solve the Application.cfc problem...  I have <cfset datasource=#application.datasource#>    Where is #application.datasource#  set?  I can't find it.   I see the cfset datasource but don't see where the other variable is queried and set.   I told you I was a novice.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

In the Application.cfc from Production, I think I've found my problem....

<cfset allScopes = getPageContext().getBuiltInScopes()/>

            <cfloop list="#structKeyList(allscopes)#" index="k">

            <cfif k IS NOT 'variables'>

                     <cfoutput>    <h4>#k#</h4></cfoutput>

                    <cfdump var="#allscopes#" format="text" />

            </cfif>

This is not in the copy I have.  Should I comment this out, or change getBuiltInScopes() to getCFScopes() and promote that to Production?   There may be hope yet.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Adobe Community Professional ,
Oct 02, 2014

Copy link to clipboard

Copied

That's the one! I will stick to my original advice. No output or dump in Application.cfc. So I would suggest you comment that line out as well as the loop code. You should have at least one phase between changed code and production, namely, test.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 02, 2014

Copy link to clipboard

Copied

So, change the getBuiltInScopes() to getCFScopes()...   could the phrase be a comment saying what I had to do, or are you saying I need something else?

Obviously not: I checked it on Test and got this:

You have attempted to dereference a scalar variable of type class [Lcoldfusion.runtime.Scope; as a structure with members.

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

113 :             <!-- 141002 - changed getBuiltInScopes() from CF8 to getCFScopes() from CF10  LSW ------>

114 :             <cfset allScopes = getPageContext().getCFScopes()/>

115 :             <cfloop list="#structKeyList(allscopes)#" index="k">

116 :             <cfif k IS NOT 'variables'>

117 :                      <cfoutput>    <h4>#k#</h4></cfoutput>

Good thing I checked before I had it promoted.   Obviously, that doesn't work.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Adobe Community Professional ,
Oct 02, 2014

Copy link to clipboard

Copied

Indeed, I expected problems and changed my suggestion accordingly. The code now fails because the functionality of getCFScopes is slightly different from that of getBuiltInScopes.

I have tested it myself, and know how to correct it. However, as I said earlier, it is inadvisable to do output in Application.cfc. Besides, this particular code block apparently contributes nothing to the business code.

Comment that line out, as well as the loop that immediately follows it. Something like

  <!--- 141002 - changed getBuiltInScopes() from CF8 to getCFScopes() from CF10  LSW ------>

  <!---

<cfset allScopes = getPageContext().getCFScopes()/>

<cfloop list="#structKeyList(allscopes)#" index="k">

<cfif k IS NOT 'variables'>

<cfoutput>    <h4>#k#</h4></cfoutput>

etc.

</cfloop>

--->

Note the 3 hyphens (not 2) in the comment start-tag just before 141002.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
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.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Adobe Community Professional ,
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.

Likes

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
Reply
Loading...
Oct 02, 2014 0
Adobe Community Professional ,
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>

Likes

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
Reply
Loading...
Oct 02, 2014 0
Participant ,
Oct 07, 2014

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Oct 07, 2014 0