Opened 8 years ago
Closed 8 years ago
#14305 closed defect (fixed)
Attempting to load some preferences (maybe with wrong syntax?) via command line argument throws exception
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | 17.01 |
Component: | Core | Version: | tested |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Export some preferences to
C:\Users\vtk\Documents\jp-osm.xml
- Create a shortcut with this command line:
"C:\Program Files (x86)\JOSM\josm.exe" --load-preferences=file:///C|/Users/vtk/Documents/jp-osm.xml
(I don't know if this is the correct way to write a file path in this context, but it's based on a path string that worked with a previous version of JOSM on a previous computer.)
- Launch JOSM using the shortcut
What is the expected result?
JOSM starts normally, and applies the preferences stored in the XML file. (Probably not relevant to this bug, but I'll explain anyway: I want to use JOSM for both OpenStreetMap and OpenGeoFiction, and have exported the server and login information for each so the correct configuration can be loaded depending on which shortcut I use to launch JOSM. This worked with a previous version of JOSM on a previous computer.)
What happens instead?
JOSM reports "An unexpected exception occurred." This part of the debug info Last errors/warnings: - E: Handled by bug report queue: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
looks to me like a good hint.
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-01-02 00:53:29 +0100 (Mon, 02 Jan 2017) Build-Date:2017-01-02 02:33:21 Revision:11427 Relative:URL: ^/trunk Identification: JOSM/1.5 (11427 en) Windows 7 64-Bit Memory Usage: 155 MB / 910 MB (110 MB allocated, but free) Java version: 1.8.0_121-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1280x1024 Maximum Screen Size: 1280x1024 Program arguments: [--load-preferences=file:///C|/Users/<user.name>/Documents/jp-osm.xml] Plugins: + turnrestrictions Last errors/warnings: - E: Handled by bug report queue: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection OSM API: http://opengeofiction.net/api === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: main (1) java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:88) at org.openstreetmap.josm.tools.HttpClient.connect(HttpClient.java:74) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:286) === RUNNING THREADS === Thread: Attach Listener (5) of system Thread: Finalizer (3) of system java.lang.Object.wait(Native Method) java.lang.ref.ReferenceQueue.remove(Unknown Source) java.lang.ref.ReferenceQueue.remove(Unknown Source) java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source) Thread: IPv6-checker (18) java.net.Inet6AddressImpl.isReachable0(Native Method) java.net.Inet6AddressImpl.isReachable(Unknown Source) java.net.InetAddress.isReachable(Unknown Source) java.net.InetAddress.isReachable(Unknown Source) org.openstreetmap.josm.gui.MainApplication.lambda$checkIPv6$3(MainApplication.java:448) org.openstreetmap.josm.gui.MainApplication$$Lambda$27/231685785.run(Unknown Source) java.lang.Thread.run(Unknown Source) Thread: AWT-Shutdown (15) of system java.lang.Object.wait(Native Method) sun.awt.AWTAutoShutdown.run(Unknown Source) java.lang.Thread.run(Unknown Source) Thread: Reference Handler (2) of system java.lang.Object.wait(Native Method) java.lang.Object.wait(Unknown Source) java.lang.ref.Reference.tryHandlePending(Unknown Source) java.lang.ref.Reference$ReferenceHandler.run(Unknown Source) Thread: AWT-Windows (16) of system sun.awt.windows.WToolkit.eventLoop(Native Method) sun.awt.windows.WToolkit.run(Unknown Source) java.lang.Thread.run(Unknown Source) Thread: Thread-1 (12) of main sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus0(Native Method) sun.nio.fs.WindowsNativeDispatcher.GetQueuedCompletionStatus(Unknown Source) sun.nio.fs.WindowsWatchService$Poller.run(Unknown Source) java.lang.Thread.run(Unknown Source) Thread: Signal Dispatcher (4) of system Thread: Java2D Disposer (14) of system java.lang.Object.wait(Native Method) java.lang.ref.ReferenceQueue.remove(Unknown Source) java.lang.ref.ReferenceQueue.remove(Unknown Source) sun.java2d.Disposer.run(Unknown Source) java.lang.Thread.run(Unknown Source) Thread: main (1) Stacktrace see above.
Replying to vidthekid@…:
Do you know which version?