Page 1 of 1

XML Stage - Reject Link Error

Posted: Mon Oct 30, 2017 7:29 am
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 ?

Posted: Mon Oct 30, 2017 1:53 pm
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

Posted: Tue Oct 31, 2017 3:02 am
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

Posted: Tue Oct 31, 2017 5:59 am
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