I’ve built a PT graph and started a web server successfully.
This URL opens normally:
/route?point=52.502639%2C13.342552&point=52.578854%2C13.496704&type=json&locale=en-US&vehicle=pt&weighting=fastest&elevation=false&key=&pt.earliest_departure_time=2018-06-01T09%3A31%3A00.000Z
Returns some sensible data, and works correctly in the UI too:
{"hints":{"visited_nodes.average":"1000000","visited_nodes.sum":"1000000"},"info":{"copyrights":["GraphHopper","OpenStreetMap contributors"],"took":15091},"paths":[{"distance":24252.374,"weight":0.0,"time":4156000,"transfers":2,"points_encoded":true,"bbox":[13.332707,52.502109,13.536904,52.579185],"points":"mlm_Ia~lpAlAj@@@JFB_@HS??c]r|@????
Now I remove the second point
parameter and change /route
to /isochrone
:
/isochrone?point=52.502639%2C13.342552&type=json&locale=en-US&vehicle=pt&weighting=fastest&elevation=false&key=&pt.earliest_departure_time=2018-06-01T09%3A31%3A00.000Z
, and get a 500:
HTTP ERROR 500
Problem accessing /isochrone. Reason:
Request failed.
In the logs:
MultiException stack 1 of 3
org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=GraphHopper,parent=IsochroneResource,qualifiers={},position=0,optional=false,self=false,unqualified=null,1273691137)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
at org.jvnet.hk2.internal.ClazzCreator.resolve(ClazzCreator.java:212)
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:229)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:162)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:774)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:737)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:707)
at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:172)
at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284
MultiException stack 2 of 3
java.lang.IllegalArgumentException: While attempting to resolve the dependencies of com.graphhopper.resources.IsochroneResource errors were found
at org.jvnet.hk2.internal.ClazzCreator.resolveAllDependencies(ClazzCreator.java:247)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:358)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:162)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:774)
MultiException stack 3 of 3
java.lang.IllegalStateException: Unable to perform operation: resolve on com.graphhopper.resources.IsochroneResource
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:387)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.jersey.process.internal.RequestScope.findOrCreate(RequestScope.java:162)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2022)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:774)
at org.jvnet.hk2.internal.ServiceLocatorImpl.internalGetService(ServiceLocatorImpl.java:737)
at org.jvnet.hk2.internal.ServiceLocatorImpl.getService(ServiceLocatorImpl.java:707)
at org.glassfish.jersey.internal.inject.Injections.getOrCreate(Injections.java:172)
at org.glassfish.jersey.server.model.MethodHandler$ClassBasedMethodHandler.getInstance(MethodHandler.java:284)
at org.glassfish.jersey.server.internal.routing.PushMethodHandlerRouter.apply(PushMethodHandlerRouter.java:74)
Is it possible to make isochrones in PT mode at all?