Copy link to clipboard
Copied
So our credit card processing started generating an error out of the blue on October 28th between 3pm and 10pm ET. Last successful transaction 3:14pm then failure from 10:50pm onward. We deal with Chase Paymentech and apparently 4 other merchants experienced the same problem, same error, same time frame. This is the error:
An error occured while Parsing an XML document. Content is not allowed in prolog.
The error occurred on line 66
For us on line 66 is: <cfset myXMLDocument = XmlParse(#objGet.filecontent#)>
We do some filtering beforehand:
<cfscript>
function stripHTML(str) {
return REReplaceNoCase(str,"<[^>]*>","","ALL");
}
</cfscript>
This has been working since 2009 no problem, and we haven't changed a thing. We host on Black Iron/Rogers in Canada. I'm not sure where the other merchants host.
Paymentech is saying it's a Coldfusion problem, Rogers is saying it's an XML problem. We're caught in the middle. Reaching out here for some help.
Has Coldfusion pushed an update to servers? Has Paymentech changed something? The technical support has been pretty mediocre from all companies involved so far.
It turns out it was "an obscure bug in Coldfusion runtime and security provider libraries that manifests itself for some SSL certificates" - these three lines of code will save you a lot of time and bother. Check this solution out if you've recently updated your SSL certificate and you get parsing errors.
<cfset objSecurity = createObject("java", "java.security.Security") />
<cfset storeProvider = objSecurity.getProvider("JsafeJCE") />
<cfset objSecurity.removeProvider("JsafeJCE") />
Put these immed
...Copy link to clipboard
Copied
A Byte Order Mark (BOM) probably got in the way. Ben Nadel shows one way to deal with a BOM.
You could replace <cfset myXMLDocument = XmlParse(#objGet.filecontent#)> with the 3 lines,
<!--- Remove extraneous space --->
<cfset trimmedContent = trim(objGet.filecontent)>
<!--- Remove BOM --->
<cfset filteredContent =replace(trimmedContent,chr(65279),"","all")>
<cfset myXMLDocument = XmlParse(filteredContent)>
Copy link to clipboard
Copied
It turns out it was "an obscure bug in Coldfusion runtime and security provider libraries that manifests itself for some SSL certificates" - these three lines of code will save you a lot of time and bother. Check this solution out if you've recently updated your SSL certificate and you get parsing errors.
<cfset objSecurity = createObject("java", "java.security.Security") />
<cfset storeProvider = objSecurity.getProvider("JsafeJCE") />
<cfset objSecurity.removeProvider("JsafeJCE") />
Put these immediately before making the CFHTTP call to the secure server.