Open selaazdoudi opened 1 month ago
Can you try to download data from here to make sure you have the latest and correct data set: https://storage.googleapis.com/marduk-production/outbound/netex/rb_norway-aggregated-netex.zip
We do not support using OTP as a library, but so before we look futher into this problem you will have to recreate the problem running OTP with java. I hope this helps...
Also, you want to use the latest version of OTP.
2.2.0 is over 2 years old.
Thank you both for your answers Which versions of Java (and the corresponding OTP version) can handle NeTEx data the best? I can only use up to Java 17.
OTP is continuously improved so my recommendation is to use OTP 2.6.0 and Java 21.
You can check the changelog when we switched to Java 21.
Expected behavior
The graph build process should complete successfully without any errors.
Observed behavior
The graph build process fails with a NullPointerException related to the OrganisationsInFrame_RelStructure element in the Netex data. The specific error message is:
java.lang.NullPointerException: Cannot invoke "org.rutebanken.netex.model.OrganisationsInFrame_RelStructure.getOrganisation_()" because "elements" is null
Version of OTP used (exact commit hash or JAR name)
Version:
2.2.0
Commit hash:0ccb4b4f33c0f21cb981b84b320d49923f26e437
Branch:temp-release
Data sets in use (links to GTFS and OSM PBF files)
Netex file:
rb_norway-aggregated-netex-2
OSM PBF file:norway-latest.osm.pbf
Command line used to start OTP
I am starting OTP from R
log1 <- otp_build_graph( otp = path_otp, # Path to otp-2.2.0-shaded.jar dir = file.path(path_data), # Full path to the norway folder memory = 10240, # Allocate 10GB of memory router = "norway" # Use the norway router )
Router config and graph build config JSON
{ "areaVisibility": true, "platformEntriesLinking": true, "islandWithoutStopsMaxSize": 5, "islandWithStopsMaxSize": 5, "dataImportReport": true, "netexDefaults": { "moduleFilePattern": "rb_norway-aggregated-netex-2", "sharedFilePattern": "_stops.xml", "sharedGroupFilePattern": "_(\\w{3})(_flexible)?_shared_data.xml", "groupFilePattern": "(\\w{3})_.*\\.xml", "feedId": "EN", "ferryIdsNotAllowedForBicycle": [ "NYC:Line:1", "NYC:Line:012fc5c4-131b-4dfc-8160-4e49136e531a", "NYC:Line:8bfef12a-ac98-4376-8a2a-eb5a336d107b" ] }, "osm": [ { "source": "norway-latest.osm.pbf", "osmTagMapping": "norway", "timeZone": "Europe/Oslo" } ] }
Steps to reproduce the problem
library(opentripplanner) library(sf) path_data <- "/Users/salma/otp" dir.create(path_data, showWarnings = FALSE) path_otp <- otp_dl_jar(version = "2.2.0") log1 <- otp_build_graph( otp = path_otp, # Path to otp-2.2.0-shaded.jar dir = file.path(path_data), # Full path to the norway folder memory = 10240, # Allocate 10GB of memory router = "norway" # Use the norway router )