#25045 closed defect (fixed)
CCE class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app')
| Reported by: | anonymous | Owned by: | team |
|---|---|---|---|
| Priority: | blocker | Milestone: | 26.12 |
| Component: | Core | Version: | tested |
| Keywords: | template_report unnamed module | Cc: |
Description
What steps will reproduce the problem?
What is the expected result?
What happens instead?
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2026-11-04 14:01:56 +0100 (Wed, 04 Nov 2026) Revision:19678 Build-Date:2026-11-07 02:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (19678 de) Windows 11 64-Bit OS Build number: Windows 10 Pro 25H2 (26200) Memory Usage: 316 MB / 8144 MB (181 MB allocated, but free) Java version: 25.0.5.1+4-LTS-20, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.00×1.00) \Display1 2560x1440x32bpp@59Hz (scaling 1.00×1.00) Maximum Screen Size: 2560×1440 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: de_DE Numbers with default locale: 1234567890 -> 1234567890 Plugins: + graphview + imagery_offset_db + terracer + turnrestrictions Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Postcode&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 Last errors/warnings: - 00000.922 W: extended font config - overriding 'filename.Malgun_Gothic=malgun.ttf' with 'MALGUN.TTF' - 00000.926 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF' - 00000.927 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF' - 00004.810 W: Fehlende Erweiterungs-Hauptversion in Erweiterung mapwithai - 00006.231 W: Fehlende Erweiterungs-Hauptversion in Erweiterung mapwithai - 00013.545 E: Handled by bug report queue: java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app') === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: main (3) java.lang.ClassCastException: class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app') 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)
Attachments (2)
Change History (91)
comment:1 by , 24 hours ago
| Keywords: | regression added |
|---|---|
| Milestone: | → 26.12 |
| Priority: | normal → blocker |
| Summary: | Error during App start → CCE class org.eclipse.parsson.JsonStringImpl cannot be cast to class jakarta.json.JsonArray (org.eclipse.parsson.JsonStringImpl and jakarta.json.JsonArray are in unnamed module of loader 'app') |
| Version: | → tested |
comment:2 by , 24 hours ago
comment:5 by , 23 hours ago
| Keywords: | unnamed module added |
|---|
Both tested and latest have the identical issue. Was something in the background changed?
Java versions 21 and 25.
comment:10 by , 23 hours ago
| Keywords: | regression removed |
|---|
comment:12 by , 23 hours ago
Replying to stoecker:
Bug in JOSM, broken data from Geofabrik I assume.
Well, I hope the broken data will be fixed soon, otherwise we will get lots of duplicate tickets.
comment:13 by , 22 hours ago
Yeah this definitely has to be from remote data, I checked this on a ubuntu KVM instance just to check my sanity and it's the same exact issue :/
comment:14 by , 20 hours ago
(I just wanted to apologise for being one of the other people who reported this duplicate error, and to thank you all for your work! We love JOSM and are very grateful for all your efforts!)
comment:15 by , 19 hours ago
Tracing to line 204 of Territories.java in the source code: the problem seems to relate to some code that expects to read a JSON list/array from a JSON key named 'ISO3166-1:alpha2'.
Editing my local cache of the JSON file to replace the values for that key (and also 'ISO3166-2') with JSON arrays (e.g. replacing "ISO3166-1:alpha2":"AA,BB" with "ISO3166-1:alpha2":["AA","BB"] and so on, as a temporary workaround, allows JOSM to load.
by , 19 hours ago
| Attachment: | josm-geofabrik-final.patch added |
|---|
comment:38 by , 19 hours ago
Sorry, I didn't scroll far enough to see the even more dupes! I posted a duplicate patch on #25068:
Ccause is a format change in the Geofabrik index, and it affects every platform. Geofabrik has restructured index-v1-nogeom.json, and our mirror at https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json has picked up the new version. The ISO 3166 properties used to be arrays and are now comma-separated strings:
old: "iso3166-1:alpha2" : [ "PS", "IL" ] new: "iso3166-1:alpha2" : "PS,IL"
The new format is on every region that has an ISO code. Territories.initializeExternalData calls props.getJsonArray(), which throws ClassCastException. The method only catches IOException | JsonParsingException, so the exception reaches MainInitialization and startup aborts during "initializing internal boundary data". The taginfo URLs have changed shape as well (https://taginfo.geofabrik.de/asia:afghanistan), but we only store those, so that needs no code change.
Attached patch:
- accepts the ISO codes both as an array (old format) and as a comma-separated string (new format)
- uses
urls.getString("taginfo", null), becausegetString(name)throws if a region has no taginfo URL - also catches
JsonException(the parent ofJsonParsingException) andClassCastException, so any future structure change in this optional data logs a warning instead of stopping startup - parameterises
TerritoriesTest.testTaginfoGeofabrik_nominalover the existing fixture and a new one in the new format (test/data/taginfo/geofabrik-index-v1-nogeom-csv.json)
Tested against the current live index: 264 regions load with no warnings.
Released versions will crash on startup until users get a build with the fix. A faster stop-gap would be to convert the two ISO properties back to arrays in the mirrored copy under /remote/, if that copy is produced by a script on our side. That would fix every installed version immediately.
comment:40 by , 19 hours ago
r19696 stops the crash, but with the current index the Geofabrik regional taginfo cache is now always empty: parsing aborts at the first feature. The attached patch (rebased on r19696) reads both the old array format and the new comma-separated strings, so the regional taginfo entries come back. Tested against the live index: 264 regions load with no warnings.
by , 19 hours ago
| Attachment: | territories-geofabrik-25068.patch added |
|---|
read the new format data, rebased onto r19696
comment:41 by , 19 hours ago
Looks like tomorrow there will be the first "tested" Java 17 version. Now that sounds like fun :-) Hope we didn't break anything essential...
comment:43 by , 18 hours ago
Replying to stoecker:
In 19697/josm:
Noticed that urls.getString(TAGINFO), which would throw an uncaught NullPointerException if a region had no taginfo URL. All 554 regions do have one, so it doesn't block tomorrow's release. It would be a one-line hardening change: .getString(TAGINFO, null)
comment:77 by , 15 hours ago
To reduce the amount of dups I started latest build by hand and released new tested 19700.
I fear we'll nevertheless continue to get a lot dupicates of this, as not every release channel will pick up the new version that fast.
At least we're sure josm is actively used :-)
comment:82 by , 13 hours ago
I'm super sorry that we at Geofabrik caused this much of a problem with a bug in our index file. I'll look into fixing this on the Geofabrik side. This was not an intentional change.
comment:89 by , 2 minutes ago
MacOS app isn't working yet (its latest version is still 19678, hasn't been updated to 19700 yet)



Ticket #25046 has been marked as a duplicate of this ticket.