XML Stage - Reject Link Error

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
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

XML Stage - Reject Link Error

Post by chandra.shekhar@tcs.com »

Hi,

I am trying to load XML Messages to Teradata database using the XML stage.
The XML messages are first loaded in teradata tables with MQ Connector stage and then parsed using XML stage.
The job looks like

Code: Select all

TD Conn ---> XML Stage---> Tfr ----> TD Conn
                  |
                  | (reject link)
                File
Now there's a requirement of rejecting the XML Messages if the XML has structural difference or if the XML is corrupted etc.
I tried adding a reject link to the XML stage but the job is getting aborted with below error :-

Code: Select all

XML_Parse: java.lang.NullPointerException
at com.ibm.e2.connector.datastage.cc.CC_E2Adapter.getRejectDataSetProducer (CC_E2Adapter.java: 416)
XML_Parse: Java runtime exception occurred: java.lang.NullPointerException (com.ibm.e2.connector.datastage.cc.CC_E2Adapter::getRejectDataSetProducer, file CC_E2Adapter.java, line 416)
Let me know what did I miss ?
Thanx and Regards,
ETL User
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

What release are you on and what Stage are you using? Are you using the XML Stage, with the Assembly editor, as it was defined prior to 11.3? ...or the Hierarchical Stage as it is now called?

Assuming one of those two, using a reject link can be tricky...are you using a Switch after performing validation in an xml Parser step?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chandra.shekhar@tcs.com
Premium Member
Premium Member
Posts: 353
Joined: Mon Jan 17, 2011 5:03 am
Location: Mumbai, India

Post by chandra.shekhar@tcs.com »

eostic wrote:What release are you on and what Stage are you using? Are you using the XML Stage, with the Assembly editor, as it was defined prior to 11.3? ...or the Hierarchical Stage as it is now called?

Ass ...
Datastage 8.7
XML Stage with Assembly Editor
Thanx and Regards,
ETL User
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

That is such an old release...although I can't remember anything in particular, it is possible that this functionality has been been patched and updated on several occasions.

Still.....are you approaching it correctly...? Be sure that you have your validation on, within the xmlParser step.... and then notice on the output side, on the right, that you will then see entries in the output model for the error code, etc.......

...then you need a "switch" step that can react to the error that you are getting, and then after that, you can access the info from there to assign it to an output link.

If you have that old a release with the xml Stage, you might be better off trying this with the xmlInput Stage instead.....especially if you aren't doing formal "xsd" validation but you just want to check for well-formed-ness.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply