Modify ↓

Opened 25 hours ago

Closed 23 hours ago

Last modified 2 minutes ago

#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)

josm-geofabrik-final.patch​ (6.8 KB ) - added by anonymous 19 hours ago.
territories-geofabrik-25068.patch​ (9.9 KB ) - added by wangi 19 hours ago.
read the new format data, rebased onto r19696

Download all attachments as: .zip

Change History (91)

comment:1 by skyper, 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 skyper, 24 hours ago

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

comment:3 by skyper, 24 hours ago

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

comment:4 by skyper, 23 hours ago

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

comment:5 by skyper, 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:6 by stoecker, 23 hours ago

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

comment:7 by stoecker, 23 hours ago

Bug in JOSM, broken data from Geofabrik I assume.

comment:8 by stoecker, 23 hours ago

Resolution: → fixed
Status: new → closed

In 19696/josm:

catch parsing error, fix #25045

comment:9 by stoecker, 23 hours ago

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

comment:10 by stoecker, 23 hours ago

Keywords: regression removed

comment:11 by skyper, 23 hours ago

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

in reply to:  7 comment:12 by skyper, 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 anonymous, 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 anonymous, 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 anonymous, 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 anonymous, 19 hours ago

Attachment: josm-geofabrik-final.patch​ added

comment:16 by stoecker, 19 hours ago

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

comment:17 by stoecker, 19 hours ago

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

comment:18 by stoecker, 19 hours ago

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

comment:19 by stoecker, 19 hours ago

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

comment:20 by stoecker, 19 hours ago

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

comment:21 by stoecker, 19 hours ago

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

comment:22 by stoecker, 19 hours ago

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

comment:23 by stoecker, 19 hours ago

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

comment:24 by stoecker, 19 hours ago

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

comment:25 by stoecker, 19 hours ago

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

comment:26 by stoecker, 19 hours ago

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

comment:27 by stoecker, 19 hours ago

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

comment:28 by stoecker, 19 hours ago

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

comment:29 by stoecker, 19 hours ago

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

comment:30 by stoecker, 19 hours ago

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

comment:31 by stoecker, 19 hours ago

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

comment:32 by stoecker, 19 hours ago

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

comment:33 by stoecker, 19 hours ago

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

comment:34 by stoecker, 19 hours ago

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

comment:35 by stoecker, 19 hours ago

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

comment:36 by stoecker, 19 hours ago

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

comment:37 by stoecker, 19 hours ago

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

comment:38 by wangi, 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), because getString(name) throws if a region has no taginfo URL
  • also catches JsonException (the parent of JsonParsingException) and ClassCastException, so any future structure change in this optional data logs a warning instead of stopping startup
  • parameterises TerritoriesTest.testTaginfoGeofabrik_nominal over 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:39 by stoecker, 19 hours ago

In 19697/josm:

fix #25045 - adapt loader to properly handle values of country code

comment:40 by wangi, 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 wangi, 19 hours ago

read the new format data, rebased onto r19696

comment:41 by stoecker, 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:42 by wangi, 19 hours ago

:)

at least there'll be a variety of bugs!

in reply to:  39 comment:43 by wangi, 18 hours ago

Replying to stoecker:

In 19697/josm:

fix #25045 - adapt loader to properly handle values of country code

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:44 by stoecker, 18 hours ago

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

comment:45 by stoecker, 18 hours ago

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

comment:46 by stoecker, 18 hours ago

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

comment:47 by stoecker, 18 hours ago

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

comment:48 by stoecker, 18 hours ago

In 19698/josm:

see #25045 - prevent NPE, patch by wangi

comment:49 by stoecker, 18 hours ago

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

comment:50 by stoecker, 18 hours ago

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

comment:51 by stoecker, 18 hours ago

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

comment:52 by stoecker, 18 hours ago

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

comment:53 by stoecker, 18 hours ago

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

comment:54 by stoecker, 18 hours ago

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

comment:55 by stoecker, 18 hours ago

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

comment:56 by stoecker, 18 hours ago

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

comment:57 by stoecker, 18 hours ago

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

comment:58 by stoecker, 18 hours ago

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

comment:59 by stoecker, 18 hours ago

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

comment:60 by stoecker, 18 hours ago

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

comment:61 by stoecker, 18 hours ago

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

comment:62 by stoecker, 17 hours ago

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

comment:63 by stoecker, 17 hours ago

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

comment:64 by stoecker, 17 hours ago

In 19699/josm:

add missing testfile, fix #25045

comment:65 by stoecker, 17 hours ago

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

comment:66 by stoecker, 17 hours ago

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

comment:67 by stoecker, 17 hours ago

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

comment:68 by stoecker, 17 hours ago

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

comment:69 by stoecker, 15 hours ago

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

comment:70 by stoecker, 15 hours ago

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

comment:71 by stoecker, 15 hours ago

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

comment:72 by stoecker, 15 hours ago

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

comment:73 by stoecker, 15 hours ago

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

comment:74 by stoecker, 15 hours ago

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

comment:75 by stoecker, 15 hours ago

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

comment:76 by stoecker, 15 hours ago

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

comment:77 by stoecker, 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:78 by stoecker, 15 hours ago

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

comment:79 by wangi, 13 hours ago

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

comment:80 by wangi, 13 hours ago

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

comment:81 by davebulow@…, 13 hours ago

Thank you so much for fixing this so quickly! :-)

comment:82 by anonymous, 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:83 by anonymous, 13 hours ago

(author of comment 82 and this comment here is me, Frederik Ramm)

comment:84 by stoecker, 12 hours ago

I consider this a DOM attack (Denial of Mapping) 😹

comment:85 by anonymous, 5 hours ago

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

comment:86 by anonymous, 4 hours ago

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

comment:87 by anonymous, 2 hours ago

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

comment:88 by anonymous, 103 minutes ago

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

comment:89 by mrpulley, 2 minutes ago

MacOS app isn't working yet (its latest version is still 19678, hasn't been updated to 19700 yet)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.