XALAN error in XML input stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Jaydev
Participant
Posts: 13
Joined: Thu Nov 01, 2012 6:28 am
Location: Hyderabad
Contact:

XALAN error in XML input stage

Post by Jaydev »

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.
Last edited by Jaydev on Mon Nov 05, 2012 11:12 pm, edited 1 time in total.
Regards,
Jay
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

did you check what is the output of your external source?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Make sure that you have applied all the patches.
Jaydev
Participant
Posts: 13
Joined: Thu Nov 01, 2012 6:28 am
Location: Hyderabad
Contact:

Post by Jaydev »

@Priyadarshi, o/p of external source is just routed to XML input stage and till that part job is running fine. Once XML stage tried to parse the data, error is coming.

@Istasur, Can i know what patches you want me to install?
Regards,
Jay
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

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.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Jaydev wrote:@Istasur, Can i know what patches you want me to install?
As he said, all of them. Meaning, make sure you are current on patches.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
Jaydev
Participant
Posts: 13
Joined: Thu Nov 01, 2012 6:28 am
Location: Hyderabad
Contact:

Post by Jaydev »

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
Regards,
Jay
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

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.
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

I have seen & faced quite a few issues using the windows slash "\" in the file paths to datasets etc , but not with using the unix style slash "/" even with a Windows based DS Engine.
Post Reply