[unknown type] Errors When Parsing Valid XML
There's nothing more aggravating than the ambiguous java.lang.NullPointerException when debugging CF (and Java) apps.
I've had this particular parsing issue for several weeks. The logic ran perfectly fine on my development server, however, in production it would continuously fail. Trying to debug the code, the xmlSearch() function would throw a java.lang.NullPointerException... the problem didn't seem to start there, rather with the xmlParse() function just before it. XmlParse() would only return [unknown type]. IsXmlDoc() also failed.
After troubleshooting everything I could possibly think of, I unsuccessfully tried converting the XML source encoding, checked the CF and JVM version, and anything else I could think of to make sure the server specs matched. It turned out to be a firewall issue when trying to validate the custom XML doctype against the dtd file... somehow, this never occurred to me as being a potential issue, but after the outbound rule to the dtd was created, everything worked as expected.
Hopefully this will save someone else a lot of time and frustration.
testing comment moderation