Dockerfile-Setup + HGV-Profile + Germany-Data = Error

Hello everyone,

this is a copy from this thread, but as it doesn’t have anything to do with the actual title of that thread, I figured it might increase chances to get help to open another topic. If this is against the rules, please let me know.

Here’s what I did (Win10-System, WSL2, Docker Desktop):

  1. Download and extract ORS-Github-Repo
  2. Remove everything except Dockerfile, docker-entrypoint, and folder “openrouteservice”
  3. Create folders “conf”, “elevation_cache”, “graphs”, “logs/tomcat”, “logs/ors”
  4. Move required pbf-file into folder (“germany-180101.osm.pbf”)
  5. Change Dockerfile to point to this file (“ARG OSM_FILE=./germany-180101.osm.pbf”)
  6. Build image (docker build -t ors-test .) und run (docker run -dt -u "${UID}:${GID}" --name ors-hgv -p 8080:8080 -v $PWD/graphs:/ors-core/data/graphs -v $PWD/elevation_cache:/ors-core/data/elevation_cache -v $PWD/conf:/ors-conf -e "JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms3g -Xmx6g" -e "CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost" ors-test)
    => No problems occur.

If, however, I add step 5a between 5 (adapt Dockerfile) and 6 (build image) as
5a. Adapt .\openrouteservice\src\main\resources\ors-config-sample.json by changing lines 94 and 95 ("profiles": {"active": ["hgv", "car", ...]}) => sets HGV as default profile

I get an error in the building of the graphs:

WARN [extensions.ORSOSMReader] - Index 1048576 out of bounds for length 1048576. Way id = 5084340`
[extensions.ORSOSMReader] - null. Way id = 11026496`

The last line is repeated 45 times with different Way-IDs, before the process is aborted. This is the complete docker output:

### openrouteservice configuration ###
No ors-config.json in ors-conf folder. Copy config from /ors-core/openrouteservice/src/main/resources/ors-config.json
### Package openrouteservice and deploy to Tomcat ###
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:        /usr/local/openjdk-11
Using CLASSPATH:       /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost
NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
29-Mar-2022 09:13:16.738 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/8.5.69
29-Mar-2022 09:13:16.740 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jun 30 2021 18:00:00 UTC
29-Mar-2022 09:13:16.740 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.69.0
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.10.102.1-microsoft-standard-WSL2
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/local/openjdk-11
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11.0.14.1+1
29-Mar-2022 09:13:16.741 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
29-Mar-2022 09:13:16.742 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat
29-Mar-2022 09:13:16.742 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat
29-Mar-2022 09:13:16.743 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
29-Mar-2022 09:13:16.743 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
29-Mar-2022 09:13:16.743 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
29-Mar-2022 09:13:16.743 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:TargetSurvivorRatio=75
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:SurvivorRatio=64
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxTenuringThreshold=3
29-Mar-2022 09:13:16.744 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseG1GC
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+ScavengeBeforeFullGC
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:ParallelGCThreads=4
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms3g
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx6g
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
29-Mar-2022 09:13:16.745 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=9001
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.rmi.port=9001
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
29-Mar-2022 09:13:16.746 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=localhost
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
29-Mar-2022 09:13:16.747 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
29-Mar-2022 09:13:16.778 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
29-Mar-2022 09:13:16.787 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Mar-2022 09:13:16.800 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 340 ms
29-Mar-2022 09:13:16.842 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
29-Mar-2022 09:13:16.843 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.69]
29-Mar-2022 09:13:16.872 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/ors.war]
29-Mar-2022 09:13:20.339 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
09:13:21.155 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Default path of 'ors-config.json' used for configuration
09:13:21.160 [localhost-startStop-1] INFO  org.heigit.ors.config.AppConfig - Loading configuration from /usr/local/tomcat/webapps/ors/WEB-INF/classes/ors-config.json
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.5.RELEASE)
29 Mar 09:13:21 INFO [ors.Application] - Starting Application v6.7.0 on 4dd87335af20 with PID 146 (/usr/local/tomcat/webapps/ors/WEB-INF/classes started by root in /ors-core)
29 Mar 09:13:21 DEBUG [ors.Application] - Running with Spring Boot v2.3.5.RELEASE, Spring v5.2.10.RELEASE
29 Mar 09:13:21 INFO [ors.Application] - No active profile set, falling back to default profiles: default
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
29 Mar 09:13:25 INFO [ors.Application] - Started Application in 4.156 seconds (JVM running for 9.024)
29 Mar 09:13:25 INFO [logging.LoggingUtility] - Logging configuration loaded from DEBUG_LOGGING.json, logging to file /var/log/ors/ors-logs.log
29 Mar 09:13:25 INFO [routing.RoutingProfileManager] -  Total - 3.00 GB, Free - 2.66 GB, Max: 6 GB, Used - 349.35 MB
29 Mar 09:13:25 INFO [routing.RoutingProfileManager] -       
29 Mar 09:13:25 INFO [routing.RoutingProfileManager] - ====> Initializing profiles from 'data/osm_file.pbf' (1 threads) ...
29-Mar-2022 09:13:25.149 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/ors.war] has finished in [8,277] ms
29 Mar 09:13:25 INFO [routing.RoutingProfileManager] -                               
29-Mar-2022 09:13:25.150 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/manager]
29 Mar 09:13:25 INFO [routing.RoutingProfileManager] -                
29-Mar-2022 09:13:25.181 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/manager] has finished in [31] ms
29-Mar-2022 09:13:25.182 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/examples]
29 Mar 09:13:25 INFO [routing.RoutingProfile] - [1] Profiles: 'driving-hgv', location: 'data/graphs/hgv'.
29-Mar-2022 09:13:25.294 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/examples] has finished in [112] ms
29-Mar-2022 09:13:25.294 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/docs]
29-Mar-2022 09:13:25.304 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/docs] has finished in [10] ms
29-Mar-2022 09:13:25.304 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/ROOT]
29-Mar-2022 09:13:25.313 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/ROOT] has finished in [9] ms
29-Mar-2022 09:13:25.313 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/host-manager]
29-Mar-2022 09:13:25.330 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/host-manager] has finished in [17] ms
29-Mar-2022 09:13:25.337 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
29-Mar-2022 09:13:25.344 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 8544 ms
29 Mar 09:26:53 WARN [extensions.ORSOSMReader] - Index 1048576 out of bounds for length 1048576. Way id = 5084340
29 Mar 09:26:56 WARN [extensions.ORSOSMReader] - null. Way id = 11026496
29 Mar 09:26:59 WARN [extensions.ORSOSMReader] - null. Way id = 22745401
29 Mar 09:27:02 WARN [extensions.ORSOSMReader] - null. Way id = 23655578
29 Mar 09:27:05 WARN [extensions.ORSOSMReader] - null. Way id = 24534474
29 Mar 09:27:10 WARN [extensions.ORSOSMReader] - null. Way id = 25402682
29 Mar 09:27:13 WARN [extensions.ORSOSMReader] - null. Way id = 26006990
29 Mar 09:27:16 WARN [extensions.ORSOSMReader] - null. Way id = 26738397
29 Mar 09:27:19 WARN [extensions.ORSOSMReader] - null. Way id = 27542181
29 Mar 09:27:23 WARN [extensions.ORSOSMReader] - null. Way id = 28438448
29 Mar 09:27:27 WARN [extensions.ORSOSMReader] - null. Way id = 30283941
29 Mar 09:27:30 WARN [extensions.ORSOSMReader] - null. Way id = 31966646
29 Mar 09:27:34 WARN [extensions.ORSOSMReader] - null. Way id = 33387848
29 Mar 09:27:37 WARN [extensions.ORSOSMReader] - null. Way id = 35085904
29 Mar 09:27:41 WARN [extensions.ORSOSMReader] - null. Way id = 37276491
29 Mar 09:27:46 WARN [extensions.ORSOSMReader] - null. Way id = 40236770
29 Mar 09:27:49 WARN [extensions.ORSOSMReader] - null. Way id = 43141788
29 Mar 09:27:53 WARN [extensions.ORSOSMReader] - null. Way id = 48012403
29 Mar 09:27:56 WARN [extensions.ORSOSMReader] - null. Way id = 53882534
29 Mar 09:28:00 WARN [extensions.ORSOSMReader] - null. Way id = 60363232
29 Mar 09:28:05 WARN [extensions.ORSOSMReader] - null. Way id = 77461171
29 Mar 09:28:09 WARN [extensions.ORSOSMReader] - null. Way id = 88035939
29 Mar 09:28:12 WARN [extensions.ORSOSMReader] - null. Way id = 95214102
29 Mar 09:28:16 WARN [extensions.ORSOSMReader] - null. Way id = 104370999
29 Mar 09:28:20 WARN [extensions.ORSOSMReader] - null. Way id = 113801816
29 Mar 09:28:27 WARN [extensions.ORSOSMReader] - null. Way id = 128021874
29 Mar 09:28:31 WARN [extensions.ORSOSMReader] - null. Way id = 136909443
29 Mar 09:28:35 WARN [extensions.ORSOSMReader] - null. Way id = 145581175
29 Mar 09:28:38 WARN [extensions.ORSOSMReader] - null. Way id = 152983292
29 Mar 09:28:42 WARN [extensions.ORSOSMReader] - null. Way id = 161569790
29 Mar 09:28:48 WARN [extensions.ORSOSMReader] - null. Way id = 177389226
29 Mar 09:28:52 WARN [extensions.ORSOSMReader] - null. Way id = 189921837
29 Mar 09:28:57 WARN [extensions.ORSOSMReader] - null. Way id = 201956680
29 Mar 09:29:01 WARN [extensions.ORSOSMReader] - null. Way id = 216239377
29 Mar 09:29:05 WARN [extensions.ORSOSMReader] - null. Way id = 228182731
29 Mar 09:29:11 WARN [extensions.ORSOSMReader] - null. Way id = 245296648
29 Mar 09:29:17 WARN [extensions.ORSOSMReader] - null. Way id = 261700622
29 Mar 09:29:22 WARN [extensions.ORSOSMReader] - null. Way id = 281977631
29 Mar 09:29:27 WARN [extensions.ORSOSMReader] - null. Way id = 299378719
29 Mar 09:29:31 WARN [extensions.ORSOSMReader] - null. Way id = 314973328
29 Mar 09:29:39 WARN [extensions.ORSOSMReader] - null. Way id = 342188364
29 Mar 09:29:43 WARN [extensions.ORSOSMReader] - null. Way id = 367380710
29 Mar 09:29:48 WARN [extensions.ORSOSMReader] - null. Way id = 388434942
29 Mar 09:29:53 WARN [extensions.ORSOSMReader] - null. Way id = 419948081
29 Mar 09:29:58 WARN [extensions.ORSOSMReader] - null. Way id = 454523494
29 Mar 09:30:06 WARN [extensions.ORSOSMReader] - null. Way id = 516646040
29 Mar 09:40:08 ERROR [routing.RoutingProfileManager] - java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 1048576 out of bounds for length 1048576
29 Mar 09:40:08 ERROR [routing.RoutingProfileManager] - Failed to initialize RoutingProfileManager instance.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 1048576 out of bounds for length 1048576
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
at org.heigit.ors.routing.RoutingProfileManager.initialize(RoutingProfileManager.java:178) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfileManager.getInstance(RoutingProfileManager.java:72) ~[classes/:6.7.0]
at org.heigit.ors.servlet.listeners.ORSInitContextListener.lambda$contextInitialized$0(ORSInitContextListener.java:42) ~[classes/:6.7.0]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 1048576 out of bounds for length 1048576
at org.heigit.ors.routing.graphhopper.extensions.core.CoreAlgoFactoryDecorator.prepare(CoreAlgoFactoryDecorator.java:314) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.prepareCore(ORSGraphHopper.java:787) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.postProcessing(ORSGraphHopper.java:690) ~[classes/:6.7.0]
at com.graphhopper.GraphHopper.process(GraphHopper.java:703) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.21.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:169) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:182) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:126) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.7.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
... 1 more
Caused by: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: Index 1048576 out of bounds for length 1048576
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
at org.heigit.ors.routing.graphhopper.extensions.core.CoreAlgoFactoryDecorator.prepare(CoreAlgoFactoryDecorator.java:310) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.prepareCore(ORSGraphHopper.java:787) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.postProcessing(ORSGraphHopper.java:690) ~[classes/:6.7.0]
at com.graphhopper.GraphHopper.process(GraphHopper.java:703) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.GraphHopper.importOrLoad(GraphHopper.java:680) ~[graphhopper-core-v0.13.21.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.ORSGraphHopper.importOrLoad(ORSGraphHopper.java:169) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfile.initGraphHopper(RoutingProfile.java:182) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfile.<init>(RoutingProfile.java:126) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:35) ~[classes/:6.7.0]
at org.heigit.ors.routing.RoutingProfileLoader.call(RoutingProfileLoader.java:21) ~[classes/:6.7.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
... 1 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1048576 out of bounds for length 1048576
at com.graphhopper.util.BitUtilLittle.toShort(BitUtilLittle.java:32) ~[graphhopper-core-v0.13.21.jar:?]
at com.graphhopper.storage.RAMDataAccess.getShort(RAMDataAccess.java:225) ~[graphhopper-core-v0.13.21.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.storages.HeavyVehicleAttributesGraphStorage.hasEdgeRestriction(HeavyVehicleAttributesGraphStorage.java:163) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.edgefilters.core.HeavyVehicleCoreEdgeFilter.accept(HeavyVehicleCoreEdgeFilter.java:33) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.edgefilters.EdgeFilterSequence.accept(EdgeFilterSequence.java:29) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.core.PrepareCore.prepareNodes(PrepareCore.java:190) ~[classes/:6.7.0]
at org.heigit.ors.routing.graphhopper.extensions.core.PrepareCore.doSpecificWork(PrepareCore.java:175) ~[classes/:6.7.0]
at com.graphhopper.routing.util.AbstractAlgoPreparation.doWork(AbstractAlgoPreparation.java:30) ~[graphhopper-core-v0.13.21.jar:?]
at org.heigit.ors.routing.graphhopper.extensions.core.CoreAlgoFactoryDecorator.lambda$prepare$0(CoreAlgoFactoryDecorator.java:300) ~[classes/:6.7.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
... 1 more
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - ====> Recycling garbage...
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - Before:  Total - 4.09 GB, Free - 891.66 MB, Max: 6 GB, Used - 3.22 GB
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - After:  Total - 4.36 GB, Free - 1.75 GB, Max: 6 GB, Used - 2.61 GB
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - ========================================================================
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - ====> Memory usage by profiles:
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - Total: 0 B (0.0%)
29 Mar 09:40:08 INFO [routing.RoutingProfileManager] - ========================================================================

What confuses me is the following:

  • If I do the same process and replace the Germany data with data only for the Saarland, it works.
  • If I don’t use the dockerfile, but instead docker-compose, it works.

So it seems like there are no problems in any configuration except the one I need, and I’m not able to figure out why exactly in this case I run into invalid(?) Way-IDs, whereas docker-compose (with HGV) as well as docker build with the car-profile can process the same file. I realized that the mentioned Index “1048576” is exactly 1024^2, so I assume some kind of storage limit (cf. Unable to Create Profile Graphs for Large (> 1GB) pbfs), but still in other setups this doesn’t seem to be a problem…

Any help would be appreciated!
Best regards

What’s your environment?. I had those issues using docker in MAC, (maven in container in docker has an issue with the performance). if I use a custom docker configuration everything works.

1 Like

Thanks for coming back to this! Environment is as mentioned: Win10-System, WSL2, Docker Desktop.
If any other information helps, I’m happy to provide more.

What’s your JAVA version?.
Anyway, if you are using the Germany data provided, the issue is not in the data, I used the same file for testing purposes.
Can you go into your docker container, copy the project produced to the host (with pom, files, everything) and try to execute a mvn package in that project?. Remember to execute it in the project copied to the host machine.

1 Like

Hey ethiel,

thanks for your further support! Sorry I took a while; now I’m back to my troubles with the ORS.

I agree the data itself is not the issue - as mentioned, it works fine using docker-compose.

Java Version is JDK 18.0.1.1 (current); everything else (Docker, Windows, ORS-image) should also be up to date. The previous attempts were with the current JRE-version; however, the problem remains identical.

In order to comply with your requests, I installed JDK and Maven (versions are reported correctly, so the installation and paths should be without errors). I’d need some further details on what exactly you want me to do, however. Using docker cp ors-hgv:/ E:\ORS-Container (as Admin), a whole bunch of stuff is copied into E:\ORS-Container, even though at some point I get the message open E:\ORS-Container\usr\share\man\man3\Date::Format.3pm.gz: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch. (The syntax of file or directory is wrong.) from the console (I’m not sure if this aborts any further process, it’s not reported as an error). I attach a screenshot of the final contents of this folder. There are two pom.xml in this folder; one in /ors-core/openrouteservice, and one in /usr/local/tomcat/webapps/ors/META-INF/maven/org.heigit.ors/openrouteservice.

Can you please let me know if this is correct as well as where and how (mvn package?) to execute the mvn package? I’m sorry if this is a stupid question, but I’m quite new to this and am still struggling at times.

Thank you!

– Content of the folder:
grafik

Hey everyone,
I had some further looks into this and want to provide a brief overview - maybe anyone can help me to move forward with this. As I see it, there are two issues:

  1. The “null”-warnings issued by extensions.ORSOSMReader. I can’t say whether this is actually a problem, but it doesn’t necessarily lead to an aborted process: these warnings show up for the “car” as well as the “hgv” problem (even though with different Way IDs), but the car problem is constructed successfully, whereas the hgv one isn’t. In addition, the warnings are somehow related to the pbf: They show up using Germany, Spain, Nordrhein-Westfalen, but not when using the Saarland (which might just be coincidence). Furthermore, the warnings are only issued using docker build /docker run; not when using docker-compose (does docker-compose imply a different reporting level, i.e. warnings are suppressed?).

  2. The error message issued by the routing.RoutingProfileManager, going back to a java.lang.ArrayIndexOutOfBoundsException at Index 1048576 (=1024^2). This is somehow related to a memory limit (it mentions com.graphhopper.storage.RAMDataAccess.getShort(RAMDataAccess.java:225) ~[graphhopper-core-v0.13.21.jar:?]). I am unfortunately not able to get a grip on this problem (except that it’s only triggered by the hgv profile when using docker build / docker run and is not triggered by the pbf), but I realized I’m not the first one facing it:

Neither issue has been resolved or even seen an answer, so I’m a bit lost there, but I guess it helps to know that one isn’t entirely alone.

Another approach I’m currently stuck on is building from source. I’m familiar with the github page, but I keep running into a bunch of (different) error messages (plus I’m not sure how up to date it is - still(?) referring to Java 1.11). As I understand it, the errors mostly show up because I’m trying to execute Unix commands on a Windows system, but admittedly I don’t understand too much of what I’m doing there, and the only info I have on hand is the (Unix-specific) instruction page. Is there anyone who can describe how to build from source in a Windows system? That’d be extremely helpful.

Best

@amandus: Thanks for editing the post; however, the “1.11” Java version was correctly quoted. Have a look here: Building from Source - openrouteservice documentation

Point 2 states “Make sure that you have java 1.11 set as the default Java environment.” In this case, that might be wrong on the page?

Hi @DGDIW,
sorry i was under the impression 11 is the major version, but you are right 1.11 is the correct notation.

1 Like

Hey everyone,

just to have this one updated (and probably closed): The issue was identified as a bug in the HGV Graph Storage (`ArrayIndexOutOfBoundsException` during core graph preparation for hgv · Issue #1181 · GIScience/openrouteservice · GitHub) and @andrzej has already found a solution. For me, I have copied his updated code and it works perfectly, so I guess with one of the next commits the problem will be solved for everyone.

Thanks @andrzej for your effort!
Best regards

1 Like

Great to hear that, thanks for your feedback!