Page 1 of 1

Xalan fatal error

Posted: Fri Aug 24, 2012 12:38 am
by Karthik.M
I am reading an XML file using sequential file stage in a single column successfully. I then link sequential file to XML Input stage to parse the xml file using a valid xsd schema. I load the parsed columns into another sequential file. When I run the job I get this error in XML Input stage:

APT_CombinedOperatorController,0: Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 271): The schemaLocation attribute does not contain pairs of values.
Xalan fatal error (publicId: , systemId: , line: 1, column: 271): The schemaLocation attribute does not contain pairs of values.

Please help me fix this issue !!!

Posted: Fri Aug 24, 2012 5:24 am
by eostic
For starters, don't use the sequential stage to read your file...it will only get you into trouble later on if the xml document changes slightly...one stray CRLF and usually that method will cause you all kinds of problems. Use the External Source and send in a file list and check the "url" box in the stage (there are tons of threads in here on this).

...that "could" be your issue here, especially if the document is being mis-read by the sequential Stage, but let's assume for a moment that the Seq Stage is not causing the problem [but please, change it anyway]. To figure out what is wrong with the SchemaLocation, make a copy of your xml document. Open it in an editor...look for the SchemaLocation and/or noNameSpaceSchemaLocation attribute in the header. Get rid of it entirely...the attribute and its value. Try your Job. Use that to test your code....

...then look at this attribute..what's in it? there are some very strict rules about how these are formatted...especially when there are multiples. Look on the web as to how they should be specified...if the file is being read correctly and not corrupted, then it's possible that the author of the document did things incorrectly, and xalan is reporting it correctly.

Ernie