Modify

Opened 16 years ago

Closed 16 years ago

#3071 closed defect (worksforme)

Josm 1788 do not upload data if Add node (Shift+D) has been used

Reported by: meestules@… Owned by: meestules@…
Priority: minor Milestone:
Component: Core Version: tested
Keywords: upload, add node, api Cc:

Description

Josm cannot upload changes to OSM server if I add some point usind Tools>Add node of Shift-D, and filling in longitude, latitude.

In order to upload data I need to save file, close Josm, open Josm, load file, then upload data.

Attachments (0)

Change History (7)

comment:1 by jttt, 16 years ago

Owner: changed from team to meestules@…
Status: newneedinfo

I've tested that with 1788 and 1836 and I can't reproduce the bug. Can you please provide more details, like what else you were doing, what was the error message on upload etc.

comment:2 by meestules@…, 16 years ago

About environment:
Windows Vista Home Premium 32bit
Java SE 6 Update 5 build 1.6.0_05-b13

I made following steps to reproduce problem.
1) Open cmd window

2) > java -jar josm-tested.jar

2) File > Save as > Save anyway > file name: test.osm

3) Tools > Add node > Latitude = 56.953480; Longitude = 23.107703 > Ok

4) Tools > Add node > Latitude = 56.954557; Longitude = 23.108872 > Ok

5) View > zoom to data

6) Click tool "Draw nodes (A)"

7) with mouse choose second point and draw line, ending it with doubleclick

8) File > Upload to OSM > fill comment = "Test" > press button "Upload Changes"

9) after that I've got 2 message windows:

  1. Upload to OSM API failed - java.lang.NullPointerException
  2. Uploading - Contacting the OSM server...

10) in a cmd window there is following:
C:\Users\user\Desktop>java -jar josm-tested.jar
GET http://api.openstreetmap.org/api/capabilities... OK
Communications with http://api.openstreetmap.org/api established using protocol
version 0.6
java.lang.NullPointerException

at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:94)
at org.openstreetmap.josm.actions.UploadAction$1UploadDiffTask.realRun(UploadAction.java:215)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:144)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

On other machine with windows XP, or Ubuntu at first upload works, but if after successful upload you add some other points and draw lines in same manner, than there is not possible to upload changes without closing and reopening osm file.

now I tested reopening, and have some other problem, posibly due to unresponsive osm server (i deleted line added previosly and tried to upload these changes) the messages in cmd window were:
POST http://api.openstreetmap.org/api/0.6/changeset/1959153/upload... OK
key: node:449256218
key: node:449256214
PUT http://api.openstreetmap.org/api/0.6/changeset/1959153/close... Internal Server Error
PUT http://api.openstreetmap.org/api/0.6/changeset/1959153/close... OK

Regards,
Ilmars

comment:3 by jttt, 16 years ago

Thanks. The steps don't mention it but I suppose you had to use File - New first to add points. The exeption is probably caused by the fact that the new layer have version set to null.

comment:4 by meestules@…, 16 years ago

File - New, or File - New - File - Save as ... does not help, the same problem.

comment:5 by meestules@…, 16 years ago

Now I tried same on KUbuntu 9.04 64bit machine

Java is:

java -version

java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu10)
OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode)

Steps to reproduce:
1) open Josm with "java -jar josm-tested.jar"
2) File - New
3) Shift+D - Latitude=56.953475; Longitude=23.107735 - Ok
4) Shift+D - Latitude=56.954563; Longitude=23.108872 - Ok
5) Press 1 (zoom to these 2 points)
6) Press button "Save the current data" - filename = test.osm - Save
7) File - Upload to OSM... - comment = test - Press button "Upload Changes"
8) got error message window: Upload to OSM API failed - java.lang.NullPointerException
Messages from terminal are:
ulo@computer:~/Desktop$ java -jar josm-tested.jar
GET http://api.openstreetmap.org/api/capabilities... OK
Communications with http://api.openstreetmap.org/api established using protocolversion 0.6
java.lang.NullPointerException

at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:94)
at org.openstreetmap.josm.actions.UploadAction$1UploadDiffTask.realRun(UploadAction.java:215)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:144)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)

9) close JOSM application
10) open JOSM in terminal with java -jar josm-tested.jar
11) File - Open - file = test.osm
12) try to upload file: File - Upload to OSM... - It works
messages in terminal were:
ulo@computer:~/Desktop$ java -jar josm-tested.jar
Open file: /home/ulo/Desktop/test.osm (295 bytes)
GET http://api.openstreetmap.org/api/capabilities... OK
Communications with http://api.openstreetmap.org/api established using protocol version 0.6
PUT http://api.openstreetmap.org/api/0.6/changeset/create... OK
POST http://api.openstreetmap.org/api/0.6/changeset/1964548/upload... OK
key: node:-1
key: node:-2
PUT http://api.openstreetmap.org/api/0.6/changeset/1964548/close... OK

comment:6 by plaicy, 16 years ago

Keywords: api added

comment:7 by Gubaer, 16 years ago

Resolution: worksforme
Status: needinfoclosed

Can't reproduced in r2004. Closing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain meestules@….
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.