WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.fasterxml.jackson.module.afterburner.util.MyClassLoader (file:/Users/matt/src/OpenRailRouting/target/railway_routing-0.0.1-SNAPSHOT-jar-with-dependencies.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.module.afterburner.util.MyClassLoader WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2 java.lang.NullPointerException at com.graphhopper.util.Helper.getLocale(Helper.java:53) at de.geofabrik.railway_routing.http.RailwayMatchCommand.run(RailwayMatchCommand.java:123) at de.geofabrik.railway_routing.http.RailwayMatchCommand.run(RailwayMatchCommand.java:46) 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 de.geofabrik.railway_routing.http.RailwayRoutingApplication.main(RailwayRoutingApplication.java:34)
I'm able to make some progress by hacking this out (I'm unsure what withRoute is supposed to do):
diff --git a/src/main/java/de/geofabrik/railway_routing/http/RailwayMatchCommand.java b/src/main/java/de/geofabrik/railway_routing/http/RailwayMatchCommand.java
index d35036e..bfc7c4d 100644
--- a/src/main/java/de/geofabrik/railway_routing/http/RailwayMatchCommand.java
+++ b/src/main/java/de/geofabrik/railway_routing/http/RailwayMatchCommand.java
@@ -120,8 +120,9 @@ public class RailwayMatchCommand extends ConfiguredCommand<RailwayRoutingServerC
throw new IllegalArgumentException("No input file was given. Please use the option gpx.location=*.");
}
int lastSeparator = PatternMatching.patternSplitDirFile(inputPath);
- Translation tr = new TranslationMap().doImport().getWithFallBack(Helper.getLocale(namespace.getString("instructions")));
- final boolean withRoute = !namespace.getString("instructions").isEmpty();
+ Translation tr = new TranslationMap().doImport().getWithFallBack(Helper.getLocale("en"));
+ //final boolean withRoute = !namespace.getString("instructions").isEmpty();
+ final boolean withRoute = false;
LinkedList<Path> files = PatternMatching.getFileList(inputPath, lastSeparator);
XmlMapper xmlMapper = new XmlMapper();
Trying to run the match command does not work, due to an apparently unset "instructions" field:
java -Xmx2500m -Xms50m \ -Dgraphhopper.prepare.ch.weightings=no \ -Dgraphhopper.datareader.file="$OSMFILE" \ -Dgraphhopper.graph.location="$GRAPH_CACHE"\ -jar target/railway_routing-0.0.1-SNAPSHOT-jar-with-dependencies.jar \ match --vehicle=alltracks --gps-accuracy=40.0 --gpx-location="${GPX}" $CONFIG_FILE
Results in this error:
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.fasterxml.jackson.module.afterburner.util.MyClassLoader (file:/Users/matt/src/OpenRailRouting/target/railway_routing-0.0.1-SNAPSHOT-jar-with-dependencies.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.module.afterburner.util.MyClassLoader WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2 java.lang.NullPointerException at com.graphhopper.util.Helper.getLocale(Helper.java:53) at de.geofabrik.railway_routing.http.RailwayMatchCommand.run(RailwayMatchCommand.java:123) at de.geofabrik.railway_routing.http.RailwayMatchCommand.run(RailwayMatchCommand.java:46) 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 de.geofabrik.railway_routing.http.RailwayRoutingApplication.main(RailwayRoutingApplication.java:34)
I'm able to make some progress by hacking this out (I'm unsure what withRoute is supposed to do):