aprilwebster / googletransitdatafeed

Automatically exported from code.google.com/p/googletransitdatafeed
0 stars 0 forks source link

Converting the NPTDR: calendarDuplicateService exception #291

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Convert any of TXC files supplied by http://data.gov.uk/dataset/nptdr

Error:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 
1
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at transxchange2GoogleTransitHandler.TransxchangeCalendar.calendarDuplicateService(TransxchangeCalendar.java:569)
        at transxchange2GoogleTransitHandler.TransxchangeTrips$1TripStructure.createTripStructure(TransxchangeTrips.java:205)
        at transxchange2GoogleTransitHandler.TransxchangeTrips.endElement(TransxchangeTrips.java:257)
        at transxchange2GoogleTransitHandler.TransxchangeHandlerEngine.endElement(TransxchangeHandlerEngine.java:344)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2938)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:331)
        at transxchange2GoogleTransitHandler.TransxchangeHandler.parse(TransxchangeHandler.java:153)
        at Transxchange2GoogleTransit.main(Transxchange2GoogleTransit.java:102

What version of the product are you using? On what operating system?
transxchange2GTFS 1.7.1 on Ubuntu Natty

Original issue reported on code.google.com by t...@tombh.co.uk on 18 Jun 2011 at 2:35

GoogleCodeExporter commented 8 years ago

Original comment by bdfer...@google.com on 3 Jan 2012 at 11:10

GoogleCodeExporter commented 8 years ago
Hi,
The attached patch worked around this problem for me. Do not know the 
consequences, but at least managed to make _something_ working.

More info here:
http://m.jakstys.lt/tech/2012/03/converting-nptdr-data-to-gtfs/

Original comment by desired....@gmail.com on 17 Mar 2012 at 3:29

Attachments:

GoogleCodeExporter commented 8 years ago
Excellent, thanks :)I'll give it a go.

Original comment by t...@tombh.co.uk on 8 Jun 2012 at 8:38

GoogleCodeExporter commented 8 years ago
Also, please see issue 356

Original comment by Joachim....@gmail.com on 26 Jan 2013 at 8:05

GoogleCodeExporter commented 8 years ago
Issue 356 has been merged into this issue.

Original comment by Joachim....@gmail.com on 26 Jan 2013 at 8:07