Skip to main content
November 11, 2008
Answered

XmlValidate() causes JRUN 500 Error

  • November 11, 2008
  • 1 reply
  • 606 views
Please see the code below...

The code runs for about 30 seconds and then a JRun Servlet Error is returned with "500 null" on the page.
The xml is valid and only about 10kb in size.
Not sure if this matters, but the xsd does reference another xsd in the same directory.
Any help would be greatly appreciated.

Thanks.
    This topic has been closed for replies.
    Correct answer
    I posted the following in another thread but I thought I should post it here as well since the issue has been fixed:

    It turns out the issue was because I had <xs:include schemaLocation="DocumentCommon.xsd"/> in the xsd file being called in XmlValidate. Once I copied and pasted the code in DocumentCommon.xsd into the called xsd, replacing the <xs:include schemaLocation>, it worked.

    So when I wrote in the original posting, "Not sure if this matters, but the xsd does reference another xsd in the same directory" , it turns out it did matter.

    1 reply

    November 11, 2008
    An update:

    I placed quotes around "xmlObject" in the XmlValidate function. It immediately returned an error in the <CFDUMP VAR="#errorStructure#">:
    "[Fatal Error] :1:1: Content is not allowed in prolog." Also, the Status is "NO" which means it isn't valid xml.
    The XMLParse() function does'nt return an error. I can view the xml object with <cfdump> and appears to be valid to me.
    Correct answer
    November 12, 2008
    I posted the following in another thread but I thought I should post it here as well since the issue has been fixed:

    It turns out the issue was because I had <xs:include schemaLocation="DocumentCommon.xsd"/> in the xsd file being called in XmlValidate. Once I copied and pasted the code in DocumentCommon.xsd into the called xsd, replacing the <xs:include schemaLocation>, it worked.

    So when I wrote in the original posting, "Not sure if this matters, but the xsd does reference another xsd in the same directory" , it turns out it did matter.