GraphHopper.com | Forum | GitHub | Maps | Blog

Installation error following GTFS example


#1

Hi folks,

I posted this in a different thread, but i think it got buried.
I’m having difficulty installing Graphhopper.
More specifically…

System

  • Linux Mint 18.3, which is based on Ubuntu 16.04
  • java -version gives openjdk version “9-internal”
    OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
    OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
  • javac -version gives javac 1.8.0_171

Error

Following the GTFS Quickstart directions, i get an error on the penultimate step:

~/graphhopper (master)$ java -Xmx8g -Xms8g \
>   -Dgraphhopper.datareader.file=brandenburg-latest.osm.pbf \
>   -Dgraphhopper.gtfs.file=gtfs-vbb.zip \
>   -Dgraphhopper.graph.flag_encoders=pt \
>   -Dgraphhopper.prepare.ch.weightings=no \
>   -Dgraphhopper.graph.location=./graph-cache \
>   -jar web/target/graphhopper-web-*.jar server config.yml
java.lang.NoClassDefFoundError: javax/annotation/Priority
	at org.glassfish.jersey.model.internal.ComponentBag.modelFor(ComponentBag.java:483)
	at org.glassfish.jersey.model.internal.ComponentBag.access$100(ComponentBag.java:89)
	at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:408)
	at org.glassfish.jersey.model.internal.ComponentBag$5.call(ComponentBag.java:398)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
	at org.glassfish.jersey.model.internal.ComponentBag.registerModel(ComponentBag.java:398)
	at org.glassfish.jersey.model.internal.ComponentBag.register(ComponentBag.java:309)
	at org.glassfish.jersey.model.internal.CommonConfig.register(CommonConfig.java:466)
	at org.glassfish.jersey.server.ResourceConfig.register(ResourceConfig.java:453)
	at io.dropwizard.jersey.DropwizardResourceConfig.<init>(DropwizardResourceConfig.java:67)
	at io.dropwizard.jersey.DropwizardResourceConfig.<init>(DropwizardResourceConfig.java:47)
	at io.dropwizard.setup.Environment.<init>(Environment.java:80)
	at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:37)
	at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:87)
	at io.dropwizard.cli.Cli.run(Cli.java:78)
	at io.dropwizard.Application.run(Application.java:93)
	at com.graphhopper.http.GraphHopperApplication.main(GraphHopperApplication.java:46)
Caused by: java.lang.ClassNotFoundException: javax.annotation.Priority
	at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)
	at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)
	at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
	... 19 more

#2

Progress update.

I tried again on my other computer with

  • Linux Mint 18.3
  • java -version gives openjdk version “1.8.0_171”
    OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
    OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
  • javac -version gives javac 1.8.0_171
  • So this time the java and javac versions match

Works now, so i guess i needed the java and javac versions to match.