Opened 16 minutes ago
Closed 14 minutes ago
#25083 closed defect (duplicate)
JOSM crashes during startup on the splash screen in versions 19678 and 19692. The application successfully downloads the external Geofabrik JSON file but fails while parsing it, throwing a `ClassCastException` because a JSON string is being cast to a `JsonArray`. The error occurs in `Territories.initializeExternalData()` at line 204, preventing JOSM from completing initialization and opening the main window.
| Reported by: | anonymous | Owned by: | team |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Download and run JOSM (tested with versions 19678 and 19692).
- Start JOSM normally.
- Wait for the application initialization process on the splash screen.
What is the expected result?
JOSM should complete its startup initialization and open the main application window without errors.
What happens instead?
JOSM fails during startup while initializing external territory data.
The following exception is thrown:
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray
The exception occurs in:
org.openstreetmap.josm.tools.Territories.lambda$initializeExternalData$1(Territories.java:204)
The application successfully downloads the external JSON file (HTTP 200), but fails while parsing its contents.
Please provide any additional information below. Attach a screenshot if possible.
- JOSM versions tested: 19678 and 19692.
- The issue occurs on the splash screen, before the main application window opens.
- The external data URL is: https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json
- The download completes successfully (HTTP 200, approximately 510 KB).
- The exception suggests that JOSM expects a JSON array for a property but receives a JSON string instead.
Full stack trace:
`text
java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray
at org.eclipse.parsson.JsonObjectBuilderImpl$JsonObjectImpl.getJsonArray(JsonObjectBuilderImpl.java:229)
at org.openstreetmap.josm.tools.Territories.lambda$initializeExternalData$1(Territories.java:204)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at org.openstreetmap.josm.tools.Territories.lambda$initializeExternalData$2(Territories.java:203)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at org.openstreetmap.josm.tools.Territories.initializeExternalData(Territories.java:201)
at org.openstreetmap.josm.tools.Territories.initializeExternalData(Territories.java:190)
at org.openstreetmap.josm.tools.Territories.initialize(Territories.java:124)
at org.openstreetmap.josm.gui.MainInitialization.lambda$beforeInitializationTasks$4(MainInitialization.java:85)
at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
at org.openstreetmap.josm.spi.lifecycle.Lifecycle.runInitializationTasks(Lifecycle.java:108)
at org.openstreetmap.josm.spi.lifecycle.Lifecycle.initialize(Lifecycle.java:73)
at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:1004)
at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:280)
at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:766)
`



Closed as duplicate of #25045.