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

XmlSearch function broken on CF 2018 Update 15

Explorer ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

Hello,

 

After updating from CF 2018 Update 14 to Update 15, on two separate servers, the XMLSearch function appears to be either removed or bugged to the point of non functioning.

 

I got the following error dump when after the update

error.jpg

 

Has anyone else encountered this? I have looked over the bug tracker and haven't seen a report yet, but since the update was just released I wanted to check here first.

 

Here is an example of a line of code that triggered this error:

 

<cfset searcharray = XmlSearch(data, "/Tags/Tag") />
 
Also, along with this problem attempting to uninstall Update 15 from a server that had gone through the ColdFusion lockdown process corrupted the installation where attempting to access the administrator UI resulted in a 500 error. A complete restore of the server in question was required to get functionality back.

Views

1.3K

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

Explorer , Oct 11, 2022 Oct 11, 2022

In attempting generalize the code for replying to to your request I think I found the problem. It looks like class caching might be the problem as I made a minor change to the cfm file, saved and tried again and it worked.

 

However in other places that I hadn't modified the files the problem still persisted, I shut down the ColdFusion instance, cleared the cfclasses directory and restarted the server and the problem went away.

Votes

Translate

Translate
Adobe Employee ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

Can you please add the below parameter to java.args in jvm.config 
 -Dcoldfusion.xml.allowPathCharacters=true
 Restart Coldfusion and let us know the results
 

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
Explorer ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

I had to do a complete system restore from snapshot to get the system back online, I do not have it currently installed. I can attempt on another sandbox system to see if it helps.

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
Explorer ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

I just tried on a fresh installation and the JVM argument does not work.

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
Adobe Employee ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

Can you please share the repro code to reproduce the issue, also, can you paste the contents of jvm.config

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
Explorer ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

In attempting generalize the code for replying to to your request I think I found the problem. It looks like class caching might be the problem as I made a minor change to the cfm file, saved and tried again and it worked.

 

However in other places that I hadn't modified the files the problem still persisted, I shut down the ColdFusion instance, cleared the cfclasses directory and restarted the server and the problem went away.

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
Adobe Employee ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

Hi @neochad 

 

We did some changes in XML signature and that is why you are seeing this problem. It should clear the classes while applying the update and when you test the xmlsearch it should work. In case you are seeing the problem again, please clear the classes from \ColdFusion2018\{instances}\wwwroor\WEB-INF\cfclasses folder and it should take care of the issue. 

 

In the meantime, I am testing the scenario where it should clear the classes in runtime when the update installation is in progress. If there is an issue, I will report a bug. 

 

Thanks again for pointing out the issue. 

 

Thanks,
Priyank Shrivastava

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 15, 2022 Oct 15, 2022

Copy link to clipboard

Copied

More information on the change in XML in CF2018 Update 15: https://helpx.adobe.com/coldfusion/kb/coldfusion-2018-update-15.html

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 13, 2022 Oct 13, 2022

Copy link to clipboard

Copied

I tested with the following code on ColdFusion 2018 Update 15 and it worked fine. 🙂

<cfsavecontent variable="data" ><?xml version="1.0" encoding="ISO-8859-1"?>  
<Tags>
	<Tag>blah di blah di blah</Tag>
</Tags>
</cfsavecontent>

<cfset searcharray = XmlSearch(data, "/Tags/Tag") />

<cfdump var="#searcharray#" >

BKBK_0-1665673938892.png

 

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 13, 2022 Oct 13, 2022

Copy link to clipboard

Copied

I can confirm that I, too, can run that code BKBK offers,a nd it gets no error, even on update 5. To be clear, I do NOT have that JVM arg added. And I also created the file anew after update 5.

 

So to Adobe or others experiencing problems, is there something about BKBK's code that is not accurately representing the issue, which update 5 should prevent working (unless that JVM arg is added)?


/Charlie (troubleshooter, carehart.org)

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 16, 2022 Oct 16, 2022

Copy link to clipboard

Copied

Can anyone from (Adobe or otherwise) help clarify things here? 


/Charlie (troubleshooter, carehart.org)

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 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

LATEST

Ok, we've now learned in a reply from Adobe (Priyank) in another forum thread that the path issue and Java arg are about xmltransform (not xmlsearch). The update technotes don't clarify that, and I've asked there if he could get that changed.

 

Then, too, he clarified that this need to recompile cf code (or clear the cfclasses) is about xmlsearch. That explains the mixed messages above in this thread.

 

I've also asked there if each of these different issues affect any other cfml functions/tags related to xml processing. 


/Charlie (troubleshooter, carehart.org)

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