NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I've just done a fresh install of ubuntu 18.04, and installed josm from the standard ubuntu repositories. Josm is not working properly.

Initially it was failing to launch, and would return the error. java --version returns:

openjdk 10.0.1 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

Then it was starting but was unable to connect to the internet, so couldn't download any data, or upload any changes. The error message provided is:

java.security.InvalidAlgorithmParameterException:the trustAnchors parameter must be non-empty

Any recommendations to fix this?

asked 28 Apr '18, 00:09

keithonearth's gravatar image

keithonearth
2.9k5676108
accept rate: 13%

edited 21 May '18, 20:18


The "answer" I think is in the discussion on this other answer. As @aseerel4c26 and @keithonearth found, the problem isn't actually with JOSM itself (or that the JOSM shipped by Ubuntu is too old), but seems to be that Ubuntu broke CACERTS in 18.04. As noted at JOSM, see this bug at Ubuntu (and notice there's a release tracker at the top of that). Ignore the JDK version in that bug title, it apparently applies to them all.

permanent link
This answer is marked "community wiki".

answered 20 May '18, 10:43

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 16 Jul '18, 19:39

Thank you @SomeoneElse for the the help figuring this out, and summarising the solution with this answer. I'll add some detail to your answer.

I've successfully gotten Josm working on Ubuntu 18.04.

My original issue related to Josm not detecting Java 11, but this seems to been fixed by the developers. At least it wasn't an issue for me after adding the josm repository, and updating.

The second issue was more troublesome.

I followed the workaround described by Antti S. Lankila in the link you provided. Here's a summery.

  • I downgraded to openjdk-8-jdk

  • removed the file /etc/ssl/certs/java/cacerts

  • ran the command update-ca-certificates -f

  • started JOSM, and it worked.

The instructions I was following recommended, upgrading to openjdk-9, but neither this nor openjdk-10 is provided in the standard repositories, and Josm is not complaining about the old version of Java, so I've left it as openjdk-8-jdk. So far this has not caused any issues.

(22 May '18, 08:26) keithonearth
2

I had the same problem and I followed the summary from keithonearth, even I did'nt downgraded the openjdk, it works ! Thanks a lot.

(03 Jun '18, 18:11) Guiyou65

I guess that JOSM in the standard ubuntu repositories is (way) too old. Which version is it?

JOSM is compatible with Java 10 since version 13520 on 2018-03-12. Uninstall your current JOSM and instead try the current "tested" version of JOSM from the JOSM homepage https://josm.openstreetmap.de/ or add the JOSM repository to your APT system. Also see https://wiki.openstreetmap.org/wiki/JOSM/Linux#Debian_.28includes_Ubuntu.29 .

permanent link

answered 28 Apr '18, 09:20

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

edited 28 Apr '18, 09:20

1

I've added the josm apt repository, and now have version 13576 installed. It is booting up from the menu, the command line, and from the jar file. But in all cases it is unable to connect to the internet. I have installed Oracle Java, 8 & 10.

When starting it gives the error java.security.InvalidAlgorithmParameterException:the trustAnchors parameter must be non-empty

(I couldn't copy-past the error, so that may contain typos)

Any clues?

(29 Apr '18, 22:21) keithonearth
1

@keithonearth: due to the InvalidAlgorithmParameterException likely your JOSM cannot set up any HTTPS connections which may feel like "unable to connect to the internet". I am not sure why, though. I guess JOSM cannot find the root CA certificates. Some maybe similar issue on stackoverflow. If you persist to have this problem with the version 13520, and it runs in principle, but just gets this error, it is best to open a bug at JOSM - use the integrated JOSM bug reporter. I think this error is fixed in version 13693 (see ticket 15851). Wait for the release (see don-vip's answer) or use the "latest" version manually. Your current problem is still open - see ticket 15851.

(04 May '18, 05:31) aseerel4c26 ♦

@aseerel4c26, thank you for your comment. I've been checking on the but report every few days, and updating josm-latest from josm's repositories frequently. It's not fixed yet for 18.04, but should be soon.

(16 May '18, 20:28) keithonearth
1

If I'm reading the links correctly then the release tracker is https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/1739631 .

(20 May '18, 10:37) SomeoneElse ♦
1

Thank you @SomeoneElse! That link was very helpful. I've successfully gotten Josm working for the first time since installing 18.04. I followed the workaround described by Antti S. Lankila in your link. While I've strayed from my original question, and probably should have asked a new question, here is what I did in case it helps someone:

  • I downgraded to openjdk-8-jdk

  • removed /etc/ssl/certs/java/cacerts

  • ran the command update-ca-certificates -f

  • started JOSM, and it worked.

The instructions I was following recommended, upgrading to openjdk-9, but this was not provided in the standard repositories, and Josm is not complaining about the old version of Java, so I've left it as openjdk-8-jdk.

(20 May '18, 20:49) keithonearth

@keithonearth I'd actually suggest that you add that as an answer. I tried to summarise a "correct" answer below but yours has far more detail.

FWIW I suspect (based on what the Ubuntu bug says) that you should be able to go from openjdk 8 back to openjdk 10 after fixing CACERTS.

Edit: Yes, JOSM will run with openjdk 10 after doing this. Also note that https://josm.openstreetmap.de/ticket/15851 is still being updated, monitoring the progress (or lack of it) of the Ubuntu maintainers towards a root cause fix.

(21 May '18, 11:55) SomeoneElse ♦

Another answer seemed unnecessary, seeing as there was nothing wrong with yours, but I added an edited version of my above comment to your answer, and marked your answer correct. I think this will make the solution easy to find, if others come looking.

(22 May '18, 08:29) keithonearth
showing 5 of 7 show 2 more comments

The script in /usr/bin/josm is falling to detect the jre from the new 18.04 release. If you run the jar directly it works ok:

java -jar /routetojar/josm.jar

usually /usr/share/josm/josm.jar

permanent link

answered 28 Apr '18, 09:24

Javier%20Sanchez's gravatar image

Javier Sanchez
70114
accept rate: 0%

No, "java -jar /usr/share/josm/josm.jar" does not work on a newly-installed 18.04 system with josm from apt (josm 13576). JOSM gives its confused "proxy" message because it can't retrieve stuff.

(20 May '18, 10:22) SomeoneElse ♦

The script needed an update to detect Java 10 and 11. This is done in version 13700.

This version should be released soon (within a week max).

permanent link

answered 03 May '18, 20:19

don-vip's gravatar image

don-vip
30056
accept rate: 33%

Just to keep this answer up to date, the "trustanchor" issues (see Keithonearth's comment above) still occur and it still doesn't run. Full details at https://josm.openstreetmap.de/ticket/15851 .

(20 May '18, 10:31) SomeoneElse ♦

Still waiting on a fix. Still JOSM does not work on Ubuntu 18.04. You can get it to run by running the jar file directly but it cannot connect to the internet.

permanent link

answered 06 Jul '18, 22:40

clickletm's gravatar image

clickletm
1
accept rate: 0%

Did you try the solution provided by SomeoneElse, that I expanded upon?

(07 Jul '18, 04:29) keithonearth

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×76
×44
×2
×1

question asked: 28 Apr '18, 00:09

question was seen: 7,293 times

last updated: 16 Jul '18, 19:50

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum