Modify ↓
Opened 22 months ago
Last modified 22 months ago
#22745 new defect
UnknownHostException: josm.openstreetmap.de when josm.openstreetmap.de is not resolved on /imagery remote control call
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report | 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.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2022-04-04 22:26:00 +0200 (Mon, 04 Apr 2022) Build-Date:2022-04-05 01:30:55 Revision:18427 Relative:URL: ^/trunk Identification: JOSM/1.5 (18427 fr) Linux Ubuntu 22.04.1 LTS Memory Usage: 372 MB / 1701 MB (235 MB allocated, but free) Java version: 1.8.0_352-8u352-ga-1~22.04-b08, Private Build, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 1360×768 (scaling 1.00×1.00) Maximum Screen Size: 1360×768 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: fr_FR.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: fr_FR Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: GNOME Java package: openjdk-8-jre:amd64-8u352-ga-1~22.04 Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-5build1 fonts-noto: fonts-noto:- Dataset consistency test: No problems found Plugins: + buildings_tools (35951) + utilsplugin2 (35951) Last errors/warnings: - 02251.862 W: java.net.UnknownHostException: josm.openstreetmap.de - 02251.873 E: Handled by bug report queue: java.lang.IllegalArgumentException: java.net.UnknownHostException: josm.openstreetmap.de. Cause : java.net.UnknownHostException: josm.openstreetmap.de === REPORTED CRASH DATA === MapView#layerAdded: - layer: TMSLayer [info=Imagerie Maxar Premium[] ('International) - https://services.digitalglobe.com/earthservice/tmsaccess/tms/1.0.0/DigitalGlobe:ImageryTileService@EPSG:3857@jpg/{zoom}/{x}/{-y}.jpg?connectId={apikey} - TMS] BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (17) of main java.lang.IllegalArgumentException: java.net.UnknownHostException: josm.openstreetmap.de at org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource.lambda$handleTemplate$1(TemplatedTMSTileSource.java:105) at org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource.replacePattern(TemplatedTMSTileSource.java:80) at org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource.handleTemplate(TemplatedTMSTileSource.java:101) at org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource.<init>(TemplatedTMSTileSource.java:72) at org.openstreetmap.josm.data.imagery.JosmTemplatedTMSTileSource.<init>(JosmTemplatedTMSTileSource.java:20) at org.openstreetmap.josm.gui.layer.TMSLayer.getTileSourceStatic(TMSLayer.java:120) at org.openstreetmap.josm.gui.layer.TMSLayer.getTileSource(TMSLayer.java:77) at org.openstreetmap.josm.gui.layer.TMSLayer.getTileSource(TMSLayer.java:35) at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.initializeIfRequired(AbstractTileSourceLayer.java:575) at org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.attachToMapView(AbstractTileSourceLayer.java:557) at org.openstreetmap.josm.gui.MapView.layerAdded(MapView.java:343) at org.openstreetmap.josm.gui.layer.LayerManager.fireLayerAdded(LayerManager.java:459) at org.openstreetmap.josm.gui.layer.LayerManager.realAddLayer(LayerManager.java:234) at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:307) at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(LayerManager.java:218) at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:246) at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:218) at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:207) at org.openstreetmap.josm.io.remotecontrol.handler.ImageryHandler.lambda$handleRequest$4(ImageryHandler.java:90) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.net.UnknownHostException: josm.openstreetmap.de at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:607) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:293) at sun.net.NetworkClient.doConnect(NetworkClient.java:175) at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189) at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167) at org.openstreetmap.josm.tools.Http1Client.performConnection(Http1Client.java:78) at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:157) at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:124) at org.openstreetmap.josm.io.imagery.ApiKeyProvider.retrieveApiKey(ApiKeyProvider.java:46) at org.openstreetmap.gui.jmapviewer.FeatureAdapter.retrieveApiKey(FeatureAdapter.java:197) at org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource.lambda$handleTemplate$1(TemplatedTMSTileSource.java:103) ... 32 more
Attachments (0)
Change History (1)
comment:1 by , 22 months ago
Summary: | Incident de josm → UnknownHostException: josm.openstreetmap.de when josm.openstreetmap.de is not resolved on /imagery remote control call |
---|
Note:
See TracTickets
for help on using tickets.
To reproduce, add a breakpoint at any of the frames after MapView#layerAdded, and force that method to throw an
UnknownHostException
.http://127.0.0.1:8111/imagery?id=Maxar-Premium
The first location where we could think about handling exceptions like this is in MapView#layerAdded, e.g.
src/org/openstreetmap/josm/gui/MapView.java
The other option is in LayerManager#fireLayerAdded, with a caveat that we would have to add
ReportedException
to the catch block (in order to get the exception thrown in MapView#layerAdded).I also don't like having to wrap the exception in an
OsmTransferException
in order to get a dialog, but that could be fixed.