Modify

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#24006 closed defect (othersoftware)

Cannot Load the Program

Reported by: philipnie1321@… Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: Cc:

Description

I first test for my proxy in order to proof it's working.

[feiyang@pwnbox work]$ curl -x socks5h://127.0.0.1:7897 https://api.openstreetmap.org/api/capabilities
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
  <api>
    <version minimum="0.6" maximum="0.6"/>
    <area maximum="0.25"/>
    <note_area maximum="25"/>
    <tracepoints per_page="5000"/>
    <waynodes maximum="2000"/>
    <relationmembers maximum="32000"/>
    <changesets maximum_elements="10000" default_query_limit="100" maximum_query_limit="100"/>
    <notes default_query_limit="100" maximum_query_limit="10000"/>
    <timeout seconds="300"/>
    <status database="online" api="online" gpx="online"/>
  </api>
  <policy>
    <imagery>
      <blacklist regex=".*\.google(apis)?\..*/.*"/>
      <blacklist regex="http://xdworld\.vworld\.kr:8080/.*"/>
      <blacklist regex=".*\.here\.com[/:].*"/>
      <blacklist regex=".*\.mapy\.cz.*"/>
      <blacklist regex=".*\.api-maps\.yandex\.ru/.*"/>
      <blacklist regex=".*\.maps\.yandex\.net/.*"/>
    </imagery>
  </policy>
</osm>
[feiyang@pwnbox work]$ export JAVA_OPTS="-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=7897"
[feiyang@pwnbox work]$ josm
dpkg: no packages found matching openjdk-*-jre
dpkg: no packages found matching openjdk-*-jre:amd64
Using /usr/bin/java to execute josm.
2024-11-09 11:42:56.699 INFO: Log level is at INFO (INFO, 800)
2024-11-09 11:43:00.810 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (71 ms)
2024-11-09 11:43:00.849 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:00.853 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:00.853 WARNING: java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:00.943 INFO: Obtained 168 Tag2Link rules from resource://META-INF/resources/webjars/tag2link/2024.10.21/index.json
2024-11-09 11:43:04.347 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (25 ms)
2024-11-09 11:43:04.347 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.357 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.382 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (25 ms)
2024-11-09 11:43:04.383 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.384 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.413 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (27 ms)
2024-11-09 11:43:04.415 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.417 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.440 INFO: Could not load tool definition splitway
2024-11-09 11:43:04.448 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (27 ms)
2024-11-09 11:43:04.448 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.450 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.478 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (25 ms)
2024-11-09 11:43:04.479 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.479 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.507 INFO: GET https://api.openstreetmap.org/api/capabilities -> !!! (27 ms)
2024-11-09 11:43:04.508 WARNING: java.net.ConnectException: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)
...stacks...
2024-11-09 11:43:04.509 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.513 WARNING: Already here java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.513 SEVERE: Error initializing test ApiCapabilitiesTest:
 org.openstreetmap.josm.io.OsmApiInitializationException: org.openstreetmap.josm.io.OsmTransferException: java.net.ConnectException: Connection refused (Connection refused)
2024-11-09 11:43:04.708 INFO: Changeset updater active (checks every 60 minutes if open changesets have been closed)

Now there are two windows jump out:

  1. Would you like to change your proxy setting now?
  2. Error initializing test ApiCapabilitiesTest: org.openstreetmap.josm.io.OsmApiInitializationException: org.openstreetmap.josm.io.OsmTransferException: java.net.SocketTimeoutException: connect timed out

After I clicked "Change proxy settings" button, nothing is loaded on the main page, nor the proxy setting page (the page is totally blank). I tried josm-tested.jar, josm.jnlp and both stable and latest version on Archlinux pack/repo with http proxy or socks5h; however, all contain the error "SocketTimeoutException" and can not be loaded like what I showed.

If I use the -Djava.net.useSystemProxies=true or not to use proxy at all, a warning window will be revealed before initializing:
Missing JVM Arguments: --add-exports=java.base/sun.security.action=ALL-UNNAMED --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED These arguments should be added in the command line or start script before the -jar parameter.

Dismissed the warning, the program continues to load, and the main page is loaded. Then the change proxy setting window pops out, but when I open the setting/preference, nothing is loaded on the page (blank page). Then the Error initializing test ApiCapabilitiesTest page showed below pops out.

Attachments (0)

Change History (4)

comment:1 by anonymous, 14 months ago

I've solved this problem. This issue is because of the using of dwm or i3wm.

To run JOSM on dwm, you need to set _JAVA_AWT_WM_NONREPARENTING=1

reference: https://wiki.archlinux.org/title/Java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing

comment:2 by taylor.smock, 14 months ago

Resolution: othersoftware
Status: newclosed

in reply to:  1 comment:3 by skyper, 14 months ago

Replying to anonymous:

I've solved this problem. This issue is because of the using of dwm or i3wm.

To run JOSM on dwm, you need to set _JAVA_AWT_WM_NONREPARENTING=1

reference: https://wiki.archlinux.org/title/Java#Gray_window,_applications_not_resizing_with_WM,_menus_immediately_closing

I am glad you solved it. Though the linked page suggests AWT_TOOLKIT=MToolkit instead of _JAVA_AWT_WM_NONREPARENTING=1 for java9+.

Replying to philipnie1321@…:


After I clicked "Change proxy settings" button, nothing is loaded on the main page, nor the proxy setting page (the page is totally blank). I tried josm-tested.jar, josm.jnlp and both stable and latest version on Archlinux pack/repo with http proxy or socks5h; however, all contain the error "SocketTimeoutException" and can not be loaded like what I showed.

I do not think, we can handle every WM in the .jnlp and for sure not in the .jar. Though Archlinux could solve this in the start script. You could create a bug report asking to check the WM and adding the needed environment variable.

If I use the -Djava.net.useSystemProxies=true or not to use proxy at all, a warning window will be revealed before initializing:
Missing JVM Arguments: --add-exports=java.base/sun.security.action=ALL-UNNAMED --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED These arguments should be added in the command line or start script before the -jar parameter.

This is expected if you use the .jar file without a start script. See #23355 and #23489.

in reply to:  2 comment:4 by skyper, 14 months ago

Replying to taylor.smock:
I did not check the Ubuntu/Debian packages but this could be an issue and might be solved in the start script.

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.