Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DummyReferenceVertex distance method called for some trips #150

Closed
novalis opened this issue Jul 18, 2011 · 4 comments
Closed

DummyReferenceVertex distance method called for some trips #150

novalis opened this issue Jul 18, 2011 · 4 comments

Comments

@novalis
Copy link
Contributor

novalis commented Jul 18, 2011

Just built a graph using NYCT subway GTFS + OSM data and got the following exception:

{{{
Feb 15, 2010 12:25:54 PM com.sun.jersey.server.impl.application.WebApplicationImpl mapMappableContainerException
SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.UnsupportedOperationException
at org.opentripplanner.routing.impl.DummyReferenceVertex.distance(DummyReferenceVertex.java:58)
at org.opentripplanner.routing.algorithm.AStar.getShortestPathTree(AStar.java:306)
at org.opentripplanner.routing.impl.RoutingServiceImpl.route(RoutingServiceImpl.java:129)
at org.opentripplanner.routing.impl.PathServiceImpl.plan(PathServiceImpl.java:100)
at org.opentripplanner.api.ws.Planner.generatePlan(Planner.java:187)
at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:156)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:208)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:75)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:115)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:67)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:724)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:689)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:680)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:324)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:604)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:637)
2010-02-15 12:25:54,181 ERROR [StandardWrapperValve.java:260] : Servlet.service() for servlet Jersey threw exception
java.lang.UnsupportedOperationException
at org.opentripplanner.routing.impl.DummyReferenceVertex.distance(DummyReferenceVertex.java:58)
at org.opentripplanner.routing.algorithm.AStar.getShortestPathTree(AStar.java:306)
at org.opentripplanner.routing.impl.RoutingServiceImpl.route(RoutingServiceImpl.java:129)
at org.opentripplanner.routing.impl.PathServiceImpl.plan(PathServiceImpl.java:100)
at org.opentripplanner.api.ws.Planner.generatePlan(Planner.java:187)
at org.opentripplanner.api.ws.Planner.getItineraries(Planner.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:156)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:208)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:75)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:115)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:67)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:724)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:689)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:680)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:324)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:604)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:637)
}}}

Request URL: {{{http://localhost:8080/opentripplanner-api-webapp/ws/plan?_dc=1266254757963&fromPlace=40.784466718261%2C-73.976200128125&toPlace=40.72816178662%2C-73.990963006543&arriveBy=false&date=02%2F15%2F2010&time=12%3A25%20pm&optimize=SAFE&maxWalkDistance=840&mode=TRANSIT%2CWALK&wheelchair=false&toCoord=0.0%2C0.0&fromCoord=0.0%2C0.0&intermediatePlaces=}}}

Haven't investigated this yet, but I assume this was introduced by r536.

@novalis
Copy link
Contributor Author

novalis commented Jul 18, 2011

FYI, just reverted to r535 and the problem is gone.

--nicholasbs

@novalis
Copy link
Contributor Author

novalis commented Jul 18, 2011

I also noticed the mentioned bug (or something alike), and the attached band-aid/(proof-of-concept patch) avoids it.

--flaktack

@novalis
Copy link
Contributor Author

novalis commented Jul 18, 2011

Replying to [comment:2 flaktack]:

I also noticed the mentioned bug (or something alike), and the attached band-aid/(proof-of-concept patch) avoids it.

I thought I'd be a bit more verbose:

The error seems to be caused by Intersection objects containing references(?) to vertices which don't get dummified. Dummifying and de-dummifying the vertices seems to make everything work again (tm). (Or something like that, my recollection is kinda vague...)

--flaktack

@novalis
Copy link
Contributor Author

novalis commented Jul 18, 2011

Fixed in r545.

--novalis

@novalis novalis closed this as completed Jul 18, 2011
kalon33 pushed a commit to kalon33/OpenTripPlanner that referenced this issue Sep 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant