The getBuiltInScopes method was not found - coldfusion

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?
Environment: Oracle 10.2 ColdFusion front end

Related

Coldfusion 2021 Update 5 breaks xml

I just applied update 5 and now I am getting XML errors:
"Error","ajp-nio-127.0.0.1-8020-exec-10","10/13/22","11:28:42","Medlists3","coldfusion.runtime.CFPage.XmlSearch(Lcoldfusion/xml/XmlNodeList;Ljava/lang/String;)Ljava/lang/Object;
https://helpx.adobe.com/coldfusion/kb/coldfusion-2021-update-5.html says
CHANGE IN XML
If the XML path contains a forward slash or backslash, it will be
blocked. The flag, coldfusion.xml.allowPathCharacters, must be set to
true to allow the same.
But I don't know where to make this change.
This question was asked on CFML Slack and it was said that you needed to manually clear all .class files from disk since the bytecode is not binary compatible.
A legacy Fusebox 5 coldfusion application got this exact error. Following up on gabriel's note: after deleting the contents of cfclasses, I had to restart the Coldfusion 2021 Application in services (Windows Server 2019) in order for the contents of cfclasses to refresh. After the restart, the application worked as normal.
Adobe added the following comment for the patch notes for CF2018 Update 15, but they said that this shouldn't be an issue in ColdFusion 2021-
https://helpx.adobe.com/coldfusion/kb/coldfusion-2018-update-15.html
--
Known issues in this release
If you encounter the following error message, clear the classes in <CF_HOME>/instance/wwwroot/WEB-INF/cfclasses.
"coldfusion.runtime.CFPage.XmlSearch(Lcoldfusion/xml/XmlNodeList;Ljava/lang/String;)Ljava/lang/Object; The specific sequence of files included or processed is: \<filepath>, line: 34 "
java.lang.NoSuchMethodError: coldfusion.runtime.CFPage.XmlSearch(Lcoldfusion/xml/XmlNodeList;Ljava/lang/String;)Ljava/lang/Object;
If the Uninstall button is disabled on Update 15, uninstall the
update using the uninstaller.jar present in the hf-updates folder.
your application uses the functions XmlSearch and XmlTransform,
you'll have to recompile the files after applying Update 15.
--
I added the variable "-Dcoldfusion.xml.allowPathCharacters=true" in Java JVM arguments and it worked.
In your Coldfusion Administrator, under Server Settings, Java and JVM, in the JVM Arguments box, append the following to the end (make sure there is a space after the last entry:
-Dcoldfusion.xml.allowPathCharacters=true
Then restart the CF Service.
Took care of the problem for us.

Got error 'invalid UTF-8 string at offset 1' from regexp

I need help, I have tried to find the solution but until now all I have found is stuff related to regex but I think the problem might be in another place.
I have a project locally (Windows 10 --> Xampp Latest version [Apache & Mysql], I use CodeIgniter as Framework, I developed a function which searches in my database using REGEXP (I use query builder)
It works fine and everything. Here I searched for saltarín <-- Note the accent on the letter i
So now that it works I have decided to update the online website but as soon as I was testing the online project I noticed an error jumps when I search something with accented characters or in this case the letter ñ which also works locally.
I checked my database configurations, in database.php I have dbcollat set to utf8_spanish_ci and my online database and tables are set to utf8_spanish_ci too, I think this must be a server configuration but I don't have an idea of what it really could be
In case you need it this is the piece of code which uses regexp
$this->db->where("lower(secret_colum_name) REGEXP", $this->secret_hehe);
Thanks a lot for your time, I really appreciate your help.
EDIT: I forgot to mention I'm using hostinger to host my website
It's me again. It was just as I suspected it was something about the server, After some hours of research I found out that my server didn't have the same extensions and configurations, you can use php -m command to find out your local extensions so you can then enable them on your remote server which in my case I had to do by c-panel but your case could be different.
I also changed my php version in the remote server and I'm not really sure about the next thing but it might have helped.
I had a setter defined in my model which did the next thing
$this->my_var = strtolower($my_var);
I removed strtolower and after all the steps previously mentioned I reloaded my site and now it works

Cannot get Custom Attribute Finder to appear in WSO2 Identity Server Console

I did some development of a custom AttributeFinder for WSO2 4.6 several years ago, and I am trying to reproduce that old development on one of my original WSO2 4.6 instances, but I cannot get the AttributeFinder to appear in the WSO2 IS Console in Extensions. I know that 4.6 is old, but I just want to get this working with 4.6 first.
I've built the AttributeFinder in Eclipse successfully
Put a copy of the JAR in E:\WSO2\wso2is-4.6.0\repository\components\lib
Put copies of ojdbc6.jar and classes12.jar into E:\WSO2\wso2is-4.6.0\repository\components\lib
[This AttributeFinder is supposed to get the attributes from an Oracle DB]
I've updated E:\WSO2\wso2is-4.6.0\repository\conf\security\entitlement.properties by adding:
PIP.AttributeDesignators.Designator.3=my.myAttributeFinder
my.MyAttributeFinder.1=databaseUrl,jdbc:oracle:thin:#//192.168.0.xxx:1521/xxxorcl
my.MyAttributeFinder.2=userName,hr
my.MyAttributeFinder.3=password,XXXX
my.MyACAttributeFinder.4=driverName,oracle.jdbc.driver.OracleDriver
my.MyACAttributeFinder.5=dbTableName,DB_FILTERS
Then I restarted the WSO2 but when I got into the console and look at Extensions/Attributes, it is only showing the default attributes/attributefinder.
As I said, I had this working awhile ago, so I'm sure that the code I used to build the attribute finder class/jar is ok, and the lines I had to add into entitlement.properties above are ok, but it just looks like WSO2 IS doesn't even "know" that I have a custom attribute finder installed, so I think I must be missing some step or something.
Can anyone tell me what else I need to get WSO2 IS to "see" my custom attributes?
Thanks,
Jim
I just figure out what the problem was. I had added my lines to the default, out-of-box entitlement.properties, and in particular, I had the Designator line:
PIP.AttributeDesignators.Designator.3=my.myAttributeFinder
In the default entitlement.properties, there was already only one other PIP Designator lines, something like:
...Designator.1=...
What I didn't realize is that, apparently, the Designator numbering has to be sequential!
So, when I changed the line to:
PIP.AttributeDesignators.Designator.2=my.myAttributeFinder
instead of:
PIP.AttributeDesignators.Designator.3=my.myAttributeFinder
Then, the WSO2 IS picked up my custom finder ok!

Migration to ColdFusion 9 - Element is Undefined Error

I am hoping I can get an answer to this. We recently migrated a ColdFusion site to a new server, which has ColdFusion 9. The older server had 7 on it, maybe 8. Everything was working find on the old system. Now, I get the Element Undefined Errors.
The Application.cfm (not .cfc) is in the webroot where it always was. There is no Application.cfc file.
Here is a screen shot of the Application dump:
Here is a sample page with the error: http://www.luxurylifestyle.com/listings/send_message.cfm?id=26552
So, in the screenshot above, there is the captchaseed, etc., but when it tries to call it - it says it's undefined.
Any help is GREATLY appreciated! I am sure this is something easy, but I've never done this migration before, so have no idea why it won't work.
ADDED FROM THE COMMENTS
In the Application.cfm, located in the web root, there is the following:
<cfset APPLICATION.captchaseed = 'ACDEFGHJKLMNPQRTUVWXY34679'>
Here is a link to the screen shot with the cfdump.
Here are a few examples of the undefined errors for reference: http://www.luxurylifestyle.com/listings/send_message.cfm?id=31820
http://www.luxurylifestyle.com/newsletter_box_action.cfm
I don't think we've got enough to answer this yet, but let's try.
Can you check your file system between send_message.cfm and the Application.cfm in your root directory, and check if there's any other Application.cfm in between.
Also check for any <cfapplication> tags in any of the files making up the request.
Can you also check your code for anything that might be clearing the application scope, or elements in it.
Can you also pls put a try/catch around the line that's erroring, and dump out the application scope at that point.
I suspect you have a second being initialised somewhere during your request which is overwriting the one you're expecting. This is, currently, just speculation.
I'll update this answer as more info comes in.

Why does a long cfc file work in CF8, but not CF9? Getting "Branch target offset too large for short" error

I have a fairly long cfc file, about 1800 lines long, that worked fine in ColdFusion 8, but after upgrading my development system to ColdFusion 9 and doing some testing I get a compile error for a cfc and the message says "Branch target offset too large for short". I modified the file to eliminate some unused functions and consolidated one to make it shorter and this resolved the problem to get it to work. But still, why did it die on me now when I upgraded to CF9? Anyone else run into this problem in previous or the current version of ColdFusion? Are there any solutions other than modifying the cfc file such as upgrading the jvm?
EDIT
If you have an answer to the questions I have, great! Post that, but don't waste time telling me something that I already know. If you are going to post a response, please read the question carefully and answer only if you know the answer. Don't do a google search and post crap that I already know and utilized to get the code to work. The question is, why did it work in CF8 and now not in CF9? Are there other solutions besides what I did?
This is a problem inherent with the JVM as you already know, CF9 has likely added more innate functions to a component and if the methods are all referenced via a giant switch statement with a short being used as the offset, we have less offset pointer space to work with each successive version. People moving from CF7 to CF8 also had the same problems.
So short answer is no.
Most recommendations you find basically tell you to split a large method into a smaller method and several helper methods. The first time I ran into an issue this worked for a large cfc I had. But then as it got bigger no number of helper functions would fix it. Eventually it had to be split into multiple cfcs.
PS: This guy said removing a transaction helped (CF7), there are none wrapping my calls though, so it's not a guaranteed fix I guess http://www.coldfusionmuse.com/index.cfm/2007/9/28/Branch.Target.Offset
Edit
Looks like my previous issue was a different function being too large, splitting the CFC into multiple CFCs was in error. I've since split that problem method into smaller methods, and have been able to consolidate all the functions in one CFC. So that is the solution it seems.
If you haven't already, try running the Code Analyzer in the CFAdmin page, "Debugging & Logging > Code Analyzer". This is a useful tool to find some changes which were made in the language between CF8 and CF9.
We had to change several variable names and function names as CF added them in 9.
Also check here:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ff0.html
CF version: 10
OS: Linux CentOS 6.0
Did face a similar issue where I had 1300+ lines of code in my cfc and one fine day I get the "Branch Target offset.." error. I tried
Code Analyser to find any loopholes of legacy- DID NOT FIX
Edited the cfc to trim down any last bit of redundant code or comments - reduced around 20+ lines of code - DID NOT FIX
I split the code into 2 cfc and extended one to the other- DID NOT FIX
I removed any unwanted dump of queries and arrays (part of testing) : THIS WORKED
so I would suggest ensure you don't have any dumps of large data content. Hope this helps.