Skip to main content
Inspiring
September 18, 2024
Answered

Coldfusion 2023 xmlTransform error

  • September 18, 2024
  • 2 replies
  • 1045 views

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.

 

 

    This topic has been closed for replies.
    Correct answer BLGelwick

    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.

     

     


    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.

    2 replies

    BKBK
    Community Expert
    Community Expert
    September 18, 2024

    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/13265555 

    BLGelwickAuthor
    Inspiring
    September 18, 2024

    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.

     

    BKBK
    Community Expert
    Community Expert
    September 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/,{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.

     

     

    Charlie Arehart
    Community Expert
    Community Expert
    September 18, 2024

    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)
    BLGelwickAuthor
    Inspiring
    September 18, 2024

    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.