XALAN error in XML input stage
Moderators: chulett, rschirm, roy
XALAN error in XML input stage
HI Forum,
I am getting below error when i am trying to read a xml file. I am using Externalsource stage to give input to xml input stage. XML file and its path given are fine, but still getting below error.
"XML_Input_10,0: Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened."
I m using Datastage 8.1. Please provide your valuable inputs.
I am getting below error when i am trying to read a xml file. I am using Externalsource stage to give input to xml input stage. XML file and its path given are fine, but still getting below error.
"XML_Input_10,0: Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 0, column: 0): An exception occurred! Type:RuntimeException, Message:The primary document entity could not be opened."
I m using Datastage 8.1. Please provide your valuable inputs.
Last edited by Jaydev on Mon Nov 05, 2012 11:12 pm, edited 1 time in total.
Regards,
Jay
Jay
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Can't say for sure, but here are some things to try:
a) try another document, especially if this is your first time doing xml stage.
b) make sure that you have "url" checked at the input link of the xmlInput Stage
c) send the External Source to a sequential file Stage directly. Are you getting a fully qualified list of files as you would expect [you should be using the unix list or "ls" command inside of the External Source Stage].
d) try removing any encoding from your test document (UTF8 or whatever).
Ernie
a) try another document, especially if this is your first time doing xml stage.
b) make sure that you have "url" checked at the input link of the xmlInput Stage
c) send the External Source to a sequential file Stage directly. Are you getting a fully qualified list of files as you would expect [you should be using the unix list or "ls" command inside of the External Source Stage].
d) try removing any encoding from your test document (UTF8 or whatever).
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
one more.
e) test it with a Server Job, using a Folder Stage to feed the xml Input Stage. Use the built in "Folder" table definition on the link. To mimic the behavior of the External Source, choose to fully qualify the filename at the Folder Stage and specify the filename column at the xmlInput Stage. You can also use the default Record column, specify "content" instead of URL at the xmlInput Stage. There are times when Server Jobs are better than EE Jobs for XML, especially when there aren't any volume issues. Server Jobs typically handle giant variable length text strings more easily. At the very least, it may help you identify where your problem is.
e) test it with a Server Job, using a Folder Stage to feed the xml Input Stage. Use the built in "Folder" table definition on the link. To mimic the behavior of the External Source, choose to fully qualify the filename at the Folder Stage and specify the filename column at the xmlInput Stage. You can also use the default Record column, specify "content" instead of URL at the xmlInput Stage. There are times when Server Jobs are better than EE Jobs for XML, especially when there aren't any volume issues. Server Jobs typically handle giant variable length text strings more easily. At the very least, it may help you identify where your problem is.
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Check patches for your particular operating system, version, etc., at http://www.ibm.com/support/fixcentral
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi All,
I am adding an update on this. I replaced External Source stage with sequential file and the job completed successfully.
So, want to know if there is any problem with External Source stage.
XML is placed in D drive of Windows Server and Path is passed to Ext source as " ls //Foldername/xml". I marked as URL/File path in XML input stage.
When ran, error i am getting is like :
"Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure "
Any idea why Ext Source stage is throwing error like this ?
Thanks
I am adding an update on this. I replaced External Source stage with sequential file and the job completed successfully.
So, want to know if there is any problem with External Source stage.
XML is placed in D drive of Windows Server and Path is passed to Ext source as " ls //Foldername/xml". I marked as URL/File path in XML input stage.
When ran, error i am getting is like :
"Fatal Error: Fatal: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 1): Invalid document structure "
Any idea why Ext Source stage is throwing error like this ?
Thanks
Regards,
Jay
Jay
In 99% of all cases, the error usually occurs in the reverse --- people get burnt when using the sequential stage (which you might) because of a stray CRLF or other character in the document that changes what is sent down the link....
So --- I would play with your External Source, going only to a sequential stage....check the results...are you getting a perfectly clean and fully qualified list of file names being generated?
...and maybe try other subdirectories, with other permissions...things like that. The problem with using the Sequential Stage, even if it is working right now, is two fold --- not only might you run into character issues, you might also run into size issues when the xml content is too large for your output link. When you use the External Source stage, the XMLInput Stage does the I/O, and removes the burden of having to pass large strings between the stages [not that it isn't do-able -- you can, but then you run into the need for various APT settings, etc. ...better to avoid it altogether]
Ernie
So --- I would play with your External Source, going only to a sequential stage....check the results...are you getting a perfectly clean and fully qualified list of file names being generated?
...and maybe try other subdirectories, with other permissions...things like that. The problem with using the Sequential Stage, even if it is working right now, is two fold --- not only might you run into character issues, you might also run into size issues when the xml content is too large for your output link. When you use the External Source stage, the XMLInput Stage does the I/O, and removes the burden of having to pass large strings between the stages [not that it isn't do-able -- you can, but then you run into the need for various APT settings, etc. ...better to avoid it altogether]
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
One thing for sure in Windows environment, your code of "ls //Foldername/xml" in the External Source Stage is not going to work correctly to find your expected XML file. I have been still trying to figure out exactly whether is because the back slash or the drive C: is coded incorrectly. Sadlly, still couldn't figure it out.