TransitDataService Method Error

44 views
Skip to first unread message

Andrew Hall

unread,
Jun 10, 2015, 10:05:52 PM6/10/15
to onebusaway...@googlegroups.com

Greetings,


We're implementing Virginia Railway Express with OneBusAway transit-data-federation-webapp and api-webapp.  We're receiving this error when we make an API call "java.lang.IllegalArgumentException: fromIndex(595) > toIndex(540)"


Sometimes we receive the error and sometimes we receive the normal arrivals and departures.  The other agencies on that OBA instance work well so I think it's isolated to VRE.


I looked in the catalina.out logs and saw the below three messages.  


Please help us resolve this issue.  Thank you for your help.


Sincerely,


Andrew Hall



2015-06-10 17:21:42,289 ERROR [TransitDataServiceExceptionInterceptor.java:41] : error executing TransitDataService method


2015-06-10 17:21:46,761 ERROR [TransitDataServiceExceptionInterceptor.java:41] : error executing TransitDataService method

java.lang.IllegalArgumentException: fromIndex(497) > toIndex(443)


2015-06-10 17:21:49,018 WARN [RemoteInvocationTraceInterceptor.java:87] : Processing of HessianServiceExporter remote call resulted in fatal exception: org.onebusaway.transit_data.services.TransitDataService.getStopWithArrivalsAndDepartures

org.onebusaway.exceptions.ServiceException: java.lang.IllegalArgumentException: fromIndex(497) > toIndex(443)

at org.onebusaway.transit_data_federation.impl.federated.TransitDataServiceExceptionInterceptor.doBasicProfiling(TransitDataServiceExceptionInterceptor.java:42)


Andrew Hall

unread,
Jun 10, 2015, 10:05:52 PM6/10/15
to onebusaway...@googlegroups.com
Greetings,

We're implementing Virginia Railway Express with OneBusAway and we're receiving an error message when we make a call to the OBA server.  The call returns the error message "java.lang.IllegalArgumentException: fromIndex(442) > toIndex(397)"  Other agencies on the same OBA instance work properly so I think it's isolated to VRE's GTFS.  Please assist us with solving this issue.  Thank you for your help.

I investigated the logs and I found these messages in the catalina.out log.

2015-06-10 17:21:42,289 ERROR [TransitDataServiceExceptionInterceptor.java:41] : error executing TransitDataService method

2015-06-10 17:21:46,761 ERROR [TransitDataServiceExceptionInterceptor.java:41] : error executing TransitDataService method

java.lang.IllegalArgumentException: fromIndex(497) > toIndex(443)


2015-06-10 17:21:49,018 WARN [RemoteInvocationTraceInterceptor.java:87] : Processing of HessianServiceExporter remote call resulted in fatal exception: org.onebusaway.transit_data.services.TransitDataService.getStopWithArrivalsAndDepartures

org.onebusaway.exceptions.ServiceException: java.lang.IllegalArgumentException: fromIndex(497) > toIndex(443)

at org.onebusaway.transit_data_federation.impl.federated.TransitDataServiceExceptionInterceptor.doBasicProfiling(TransitDataServiceExceptionInterceptor.java:42)


 

Regards,


Andrew Hall

Kurt Raschke

unread,
Jun 11, 2015, 7:57:00 PM6/11/15
to onebusaway...@googlegroups.com
On Wed, Jun 10, 2015 at 10:01 PM, Andrew Hall <and...@transitscreen.com> wrote:

The other agencies on that OBA instance work well so I think it's isolated to VRE.


Is this with or without VRE's GTFS being corrected for the 'backwards' shapes?

(VRE's GTFS reuses the same shape for trips in both directions along a route; there is a transformer in the OBA GTFS transformer to fix this so that trips are associated with shapes that progress in the same direction as the trip.)

I would not be surprised by that error if it's with an unpatched VRE GTFS file - but if the GTFS been fixed so that shape points and trips progress in the same direction, then this is indeed a distinct (although related) issue.

The exception is actually getting thrown from the call to Arrays.binarySearch() here:


-Kurt

Sean Barbeau

unread,
Jul 1, 2015, 3:50:21 PM7/1/15
to onebusaway...@googlegroups.com, ku...@kurtraschke.com
Andrew,
Not sure if you're still looking into this, but it may be related to bad real-time data, specifically stop_sequence values that don't match with stop_ids, or out-of-range stop_sequences for a given trip_id.

See https://github.com/OneBusAway/onebusaway-application-modules/issues/136.

Sean

Andrew Hall

unread,
Jul 10, 2015, 2:17:02 PM7/10/15
to onebusaway...@googlegroups.com, ku...@kurtraschke.com
Sean,

Thanks to you and Kurt for your responses. 

I removed the real-time configuration and I'm still having similar issues with VRE. 

Sheldon A. Brown

unread,
Jul 10, 2015, 3:54:21 PM7/10/15
to onebusaway...@googlegroups.com
This is the temporary patch, to get past the issue:

https://github.com/camsys/onebusaway-application-modules/commit/01e6337dba823e109c7c1b5d367fdb727bca35e9

(you can cherry-pick that commit, or make the change yourself).

I hope to add some unit tests around the issue and get a better
understanding of it. But the error is implying invalid shapes or it
could perhaps simply be a bug in the indexes corresponding to the
shapes.

Once I can confirm the issue, I'll try to push this out to master.

Sheldon
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to onebusaway-devel...@googlegroups.com.
> To post to this group, send email to onebusaway...@googlegroups.com.
> Visit this group at http://groups.google.com/group/onebusaway-developers.
> For more options, visit https://groups.google.com/d/optout.

Andrew Hall

unread,
Jul 14, 2015, 8:45:47 PM7/14/15
to onebusaway...@googlegroups.com
Thank you for the link to the patch.  We got VRE to work by building the application without the shapes.txt file.

Andrew
Reply all
Reply to author
Forward
0 new messages