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

Coldfusion 2023 xmlTransform error

Community Beginner ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Hi,

 

The XMLtransform function is throwing an error on our DEV server; our other 3 servers are fine. The JVM flag -Dcoldfusion.xml.allowPathCharacters=true has been applied.

 

I am just the programmer but our system admin ask me to post this issue to see if there is another solution we can try.  XMLtransform was working fine until changes were made to get the PDF generator working. It took a few attempts on DEV before it was successful and the changes applied to the other servers. Now the XMLtransform throws the "Unable to process the XML string as it could probably contain file paths" error only on DEV.

 

Server Details
Server ProductColdFusion 2023
Version2023,0,08,330668
EditionEnterprise  
Operating SystemWindows Server 2019  
OS Version10.0  
Update Level/E:/ColdFusion2023/cfusion/lib/updates/chf20230008.jar  
Adobe Driver Version5.1.4 (Build 0001)  
Tomcat Version9.0.85.0  
Device IDbaad85e0431b7ba6b236f5b26081f8dded7b034df8355d964dba34e7366d1554  

 

JVM Arguments

-server --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED --add-exports=java.desktop/sun.java2d=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.security.rsa=ALL-UNNAMED --add-opens=java.base/sun.security.pkcs=ALL-UNNAMED --add-opens=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED -XX:+UseParallelGC -Djdk.attach.allowAttachSelf=true -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Dtika.config=tika-config.xml -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu -Dcom.sun.media.jai.disableMediaLib=true -Dcoldfusion.xml.allowPathCharacters=true

 

Any suggestions to fix this problem or does DEV need a clean builld?

Please let me know if you need more information.

 

Thank you for you help.

 

 

Views

409

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 2 Correct answers

Community Expert , Sep 18, 2024 Sep 18, 2024

OK. But before we rule out cached class files, ask the sys admin to restart ColdFusion after clearing the class files. Also ensure that ColdFusion is restarted after the Java flag  -Dcoldfusion.xml.allowPathCharacters=true is applied. That would have been easy to overlook. 

 

A second suggestion is JVM flags. When I missed the following additional flags, some of which might be relevant:

 

-Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib/,{application.home}/gateway/lib
...

Votes

Translate

Translate
Community Beginner , Sep 18, 2024 Sep 18, 2024

Hello BKBK,

We did not add the additional flags. I noticed that there was a space between - and Dcoldfusion.xml.allowPathCharacters=true in the JVM settings. The sys admin said he added the space to see if that would fix the problem. Per my request he removed the space and restarted the CF service. The xmlTransform is working now. It could very well be that a restart was overlooked when the flag was first added.

 

Thank you so much for your help.

Votes

Translate

Translate
Community Expert ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Since the problem happens only on the one server, what are the "changes [that] were made to get the PDF generator working"?

 

Indeed, what was the pdf generation problem that prompted making such changes? There may be a different solution to that, which would not have this knock on effect on your use of xmltransform. 


/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 Beginner ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Thank you, Charlie.

I asked the sys admin what changes were made to DEV to get the PDF generator to work; still waiting for his reply.

Before posting to the community, I asked him how does DEV differ from the other servers. He didn't answer but asked that I ask for help here.

 

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 Beginner ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

The original problem with PDF service ( found in the exception.log ) was

  • "Connect to 127.0.0.1:8991 [/127.0.0.1] failed: Connection refused: no further information http://127.0.0.1:8991/PDFgServlet/"
  • "Error","Thread-30","06/12/24","08:17:00","","Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "coldfusion.document.webkit.PDFgServiceManager.getEngine()" is null"

 

 

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 ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Do you have an idea when your sys admin will give you that information? It's going to be hard to identify the problem without it.

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC

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 ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

It might be caused by ColdFusion using cached class files. Hence this suggestion: clear the class files. Then restart ColdFusion.

 

That helped someone in a simlar situation. See https://community.adobe.com/t5/coldfusion-discussions/coldfusion-2021-update-5-breaks-xml/m-p/132655... 

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 Beginner ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Thank you, BKBK.

I had sent the sys admin that link when the problem was first discovered, eventhough it was for CF2021. The sys admin cleared the class files, restarted the service but it did not fix the problem.

 

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 ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

OK. But before we rule out cached class files, ask the sys admin to restart ColdFusion after clearing the class files. Also ensure that ColdFusion is restarted after the Java flag  -Dcoldfusion.xml.allowPathCharacters=true is applied. That would have been easy to overlook. 

 

A second suggestion is JVM flags. When I missed the following additional flags, some of which might be relevant:

 

-Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib/,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/bin/cf-osgicli.jar

-Dcoldfusion.searchimplicitscopes=true

-Dcoldfusion.number.allowdotsuffix=true

-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true

-Dfile.encoding=UTF-8

-Djava.awt.headless=true

-Djdk.util.zip.disableZip64ExtraFieldValidation=true

-Dlog4j2.formatMsgNoLookups=true

 

Remember to restart ColdFusion after changing the JVM properties.

 

 

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 Beginner ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Hello BKBK,

We did not add the additional flags. I noticed that there was a space between - and Dcoldfusion.xml.allowPathCharacters=true in the JVM settings. The sys admin said he added the space to see if that would fix the problem. Per my request he removed the space and restarted the CF service. The xmlTransform is working now. It could very well be that a restart was overlooked when the flag was first added.

 

Thank you so much for 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
Community Expert ,
Sep 19, 2024 Sep 19, 2024

Copy link to clipboard

Copied

LATEST

As the man said, all is well that ends well. 🙂

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 ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

What hppens when you restart ColdFusion, and test by running the following code as a CFM file?

The result should be: 7,9

<!--- XSLT transformation to convert XML --->
<cfsavecontent variable="xsl"><?xml version="1.0" encoding="UTF-8"?>
	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
	<xsl:template match="/">
	<xsl:text disable-output-escaping="yes">
	&lt;</xsl:text>SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
	<xsl:text disable-output-escaping="yes">&lt;</xsl:text>SOAP-ENV:Body<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
	
	<xsl:copy-of select="*" />
	
	<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/SOAP-ENV:Body<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
	<xsl:text disable-output-escaping="yes">&lt;</xsl:text>/SOAP-ENV:Envelope<xsl:text disable-output-escaping="yes">&gt;</xsl:text>
	</xsl:template>
	
	</xsl:stylesheet>
</cfsavecontent>
	
<!--- The XML to be transformed --->
<cfsavecontent variable="xml"><?xml version="1.0" encoding="UTF-8"?>
<book_ids quantity="2">7,9</book_ids>
</cfsavecontent>

<cfoutput>#XmlTransform(xml, xsl)#</cfoutput>

 

 

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