Modify

Opened 21 months ago

Closed 21 months ago

Last modified 20 months ago

#19735 closed defect (fixed)

josm-latest crashes on startup: java.security.AccessControlException: access denied ("java.net.SocketPermission" "josm.openstreetmap.de" "resolve")

Reported by: Matthijs Kooijman <matthijs@…> Owned by: team
Priority: major Milestone: 20.08
Component: Core Webstart Version: latest
Keywords: regression Cc:

Description (last modified by Klumbumbus)

Since today, josm-latest (16976) crashes on startup. Yesterdays version (16952 IIRC, at least 5something) still worked. The first time I started today, I got asked to update plugins and I did that, so maybe the cause is there. At startup, I get the following:

https://i.imgur.com/27u56Eb.png

Note that I can't click the "Report bug" button, since the other dialog is modal (so I don't have the nice and prefilled bug report template here, since I can't access that option).

When I click "Show Details", I get:

net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:582)
	at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:945)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:576)
	... 1 more
Caused by: org.openstreetmap.josm.tools.JosmRuntimeException: java.util.concurrent.ExecutionException: java.security.AccessControlException: access denied ("java.net.SocketPermission" "josm.openstreetmap.de" "resolve")
	at org.openstreetmap.josm.spi.lifecycle.Lifecycle.initialize(Lifecycle.java:81)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:919)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:277)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:714)
	... 6 more
Caused by: java.util.concurrent.ExecutionException: java.security.AccessControlException: access denied ("java.net.SocketPermission" "josm.openstreetmap.de" "resolve")
	at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
	at org.openstreetmap.josm.spi.lifecycle.Lifecycle.initialize(Lifecycle.java:75)
	... 9 more
Caused by: java.security.AccessControlException: access denied ("java.net.SocketPermission" "josm.openstreetmap.de" "resolve")
	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.base/java.security.AccessController.checkPermission(AccessController.java:897)
	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
	at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:292)
	at java.base/java.lang.SecurityManager.checkConnect(SecurityManager.java:821)
	at java.base/sun.net.www.protocol.jar.JarFileFactory.getCachedJarFile(JarFileFactory.java:141)
	at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:81)
	at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:125)
	at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:155)
	at java.base/java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:328)
	at org.openstreetmap.josm.tools.Utils.getResourceAsStream(Utils.java:1881)
	at org.openstreetmap.josm.tools.ResourceProvider.lambda$getResourceAsStream$1(ResourceProvider.java:83)
	at org.openstreetmap.josm.tools.ResourceProvider.getFirstNotNull(ResourceProvider.java:58)
	at org.openstreetmap.josm.tools.ResourceProvider.getResourceAsStream(ResourceProvider.java:83)
	at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:230)
	at org.openstreetmap.josm.tools.Territories.initializeInternalData(Territories.java:136)
	at org.openstreetmap.josm.tools.Territories.initialize(Territories.java:123)
	at org.openstreetmap.josm.gui.MainInitialization.lambda$parallelInitializationTasks$6(MainInitialization.java:114)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:11)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

It looks like there is some permission error on resolving josm.openstreetmap.de, but I can't quite understand why this is a problem now and not yesterday. Any suggestion about where such permissions are controlled?

Attachments (0)

Change History (11)

comment:1 Changed 21 months ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 21 months ago by Klumbumbus

Component: CoreCore Webstart

There is something wrong with webstart. I can't start josm-latest.jnlp either. (josm-latest.jar works.)

SCHWERWIEGEND: java.io.IOException: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\stefa\AppData\Local\JOSM\cache\mirror_https___josm.openstreetmap.de_maps" "read"). Ursache: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\stefa\AppData\Local\JOSM\cache\mirror_https___josm.openstreetmap.de_maps" "read")
Aug 30, 2020 1:54:47 PM org.openstreetmap.josm.tools.Territories initializeExternalData
WARNUNG: Konnte die externen Taginfo-Daten nicht verarbeiten bei https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\stefa\AppData\Local\JOSM\cache\mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json" "read")
#### Java Web Start Error:
#### access denied ("java.io.FilePermission" "C:\Users\stefa\Documents\OSM\TestNew\newpresets.xml" "read")

java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\stefa\Documents\OSM\TestNew\newpresets.xml" "read")
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkRead(Unknown Source)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at java.util.zip.ZipFile.<init>(Unknown Source)
	at org.openstreetmap.josm.io.CachedFile.findZipEntryImpl(CachedFile.java:349)
	at org.openstreetmap.josm.io.CachedFile.findZipEntryInputStream(CachedFile.java:333)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader.readAll(TaggingPresetReader.java:371)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader.readAll(TaggingPresetReader.java:406)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresetReader.readFromPreferences(TaggingPresetReader.java:445)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresets.readFromPreferences(TaggingPresets.java:60)
	at org.openstreetmap.josm.gui.tagging.presets.TaggingPresets.initialize(TaggingPresets.java:78)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:11)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(Unknown Source)
	at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(Unknown Source)
	at java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
	at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

comment:3 Changed 21 months ago by simon04

Milestone: 20.08
Priority: normalmajor

comment:4 Changed 21 months ago by taylor.smock

This is probably related (occurs on startup of josm-latest.jnlp, not with the .jar):

java.lang.NullPointerException
	at org.openstreetmap.josm.tools.Utils.getJavaVersion(Utils.java:1609)
	at org.openstreetmap.josm.tools.ImageProvider.read(ImageProvider.java:1702)
	at org.openstreetmap.josm.tools.ImageProvider.read(ImageProvider.java:1606)
	at org.openstreetmap.josm.tools.ImageProvider.getIfAvailableDataUrl(ImageProvider.java:1051)
	at org.openstreetmap.josm.tools.ImageProvider.getIfAvailableImpl(ImageProvider.java:870)
	at org.openstreetmap.josm.tools.ImageProvider.getResource(ImageProvider.java:712)
	at org.openstreetmap.josm.tools.ImageProvider.getResourceAsync(ImageProvider.java:747)
	at org.openstreetmap.josm.actions.AddImageryLayerAction.<init>(AddImageryLayerAction.java:83)
	at org.openstreetmap.josm.gui.ImageryMenu.refreshImageryMenu(ImageryMenu.java:172)
	at org.openstreetmap.josm.gui.preferences.imagery.ImageryPreference.initialize(ImageryPreference.java:332)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:33)
	at org.openstreetmap.josm.spi.lifecycle.InitializationTask.call(InitializationTask.java:11)
	at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

comment:5 Changed 21 months ago by gaben

Same NullPointerException here.

comment:7 Changed 21 months ago by simon04

In 16995/josm:

see #19729, see #19735 - Revert "Main initialization: use ForkJoinPool.commonPool"

This reverts commit r16958

comment:8 Changed 21 months ago by taylor.smock

If that is the case, the Utils class has a method which can be used: source:trunk/src/org/openstreetmap/josm/tools/Utils.java#L1280 (IIRC, I ended up using Utils.newForkJoinPool in the MapWithAI plugin, due to web start issues...)

comment:9 Changed 21 months ago by simon04

Milestone: 20.08
Resolution: fixed
Status: newclosed

Successfully tested javaws https://josm.openstreetmap.de/download/josm-latest.jnlp today.

comment:10 Changed 21 months ago by Matthijs Kooijman <matthijs@…>

Yup, also fixed for me. Thanks!

comment:11 Changed 20 months ago by Don-vip

Milestone: 20.08

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.