You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I have a XML file which has following tags. Flight and AirSegment.
AirSegment comes under Flight. Flight and AirSegment has their own unique identifiers.
I am loading this XML file to two different tables say Flight and Airsegment.
For Flight, I have made loop path from Flight and for AirSegment loop path from AirSegment.
While loading Airsegment, I need to reference in which flightID it is coming. I have given the Xpath as "../@FlightID".
Everything works fine upto here. Some of the XML files, doesn't have FlightID's in their flight element. When I refer that flightID in Airsegment, it throws the following error.
Exception in component tFileInputMSXML_1
java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at org.talend.xml.sax.SAXLoopIterator$EntryResult.getRow(SAXLoopIterator.java:132)
at org.talend.xml.sax.SAXLoopIterator$EntryResult.addRowTo(SAXLoopIterator.java:121)
at org.talend.xml.sax.SAXLoopIterator.next(SAXLoopIterator.java:72)
at org.talend.xml.sax.SAXMultiLoopIterator.next(SAXMultiLoopIterator.java:50)
at org.talend.xml.sax.SAXMultiLoopIterator.next(SAXMultiLoopIterator.java:7)
at fullproject_afterdemo.job1_0_1.job1.tFileList_1Process(job1.java:6706)
at fullproject_afterdemo.job1_0_1.job1.runJobInTOS(job1.java:10482)
at fullproject_afterdemo.job1_0_1.job1.main(job1.java:10338)
Can any one please tell me how to resolve it?
Thanks.
Offline
Pages: 1