Modify

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#3887 closed defect (fixed)

java.lang.NullPointerException while uploading (OsmTransferException)

Reported by: skyper Owned by: team
Priority: critical Component: Core
Version: latest Keywords:
Cc:

Description

Hi I got this exception while uploading

console output, dump and .osm as attachment.

cu skyper

Attachments (3)

josm.tbz (3.1 KB) - added by skyper 4 years ago.
fr-test.osm.bz2.part1 (244.1 KB) - added by skyper 4 years ago.
osm splited with split (coreutils)
fr-test.osm.bz2.part2 (98.9 KB) - added by anonymous 4 years ago.
osm splited with split (coreutils)

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by skyper

Changed 4 years ago by skyper

osm splited with split (coreutils)

Changed 4 years ago by anonymous

osm splited with split (coreutils)

comment:1 Changed 4 years ago by skyper

upload worked with version 2255

comment:2 Changed 4 years ago by Gubaer

  • Owner changed from team to skyper
  • Status changed from new to needinfo

I'd like to have a look into this but unfortunately I have no idea what .tbz is and how I can merge the part*-files together.

Can you upload the fr-test.osm in one file? Or is it too big? If so, could you put it somewhere on a server and post the URL here?

comment:3 Changed 4 years ago by skyper

Replying to Gubaer:

I'd like to have a look into this but unfortunately I have no idea what .tbz is and how I can merge the part*-files together.

tbz is short for tar + b2zip
use "tar xvjf [file-name]"

To merge. Just do "cat fr-test.osm.bz2.part* >> fr-test.osm.bz2"

Can you upload the fr-test.osm in one file? Or is it too big? If so, could you put it somewhere on a server and post the URL here?

It is to big.
Hope it works with my explanation.
Where and how can I upload (ftp) ?

comment:4 Changed 4 years ago by anonymous

  • Summary changed from java.lang.NullPointerException while uploading to java.lang.NullPointerException while uploading (OsmTransferException)
PUT http://api.openstreetmap.org/api/0.6/way/29495765... Unauthorized
org.openstreetmap.josm.io.OsmTransferException: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:581)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:462)
	at org.openstreetmap.josm.io.OsmApi.modifyPrimitive(OsmApi.java:275)
	at org.openstreetmap.josm.io.OsmServerWriter.makeApiRequest(OsmServerWriter.java:183)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesIndividually(OsmServerWriter.java:93)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:165)
	at org.openstreetmap.josm.actions.UploadAction$UploadPrimitivesTask.realRun(UploadAction.java:637)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:63)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:105)
	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)
Caused by: java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:537)
	... 11 more
org.openstreetmap.josm.io.OsmTransferException: java.lang.NullPointerException
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:581)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:462)
	at org.openstreetmap.josm.io.OsmApi.modifyPrimitive(OsmApi.java:275)
	at org.openstreetmap.josm.io.OsmServerWriter.makeApiRequest(OsmServerWriter.java:183)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadChangesIndividually(OsmServerWriter.java:93)
	at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:165)
	at org.openstreetmap.josm.actions.UploadAction$UploadPrimitivesTask.realRun(UploadAction.java:637)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:63)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:105)
	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)
Caused by: java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
	at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:537)
	... 11 more

comment:5 Changed 4 years ago by skyper

What info do you need ?
Which file do you need again ?

comment:6 Changed 4 years ago by stoecker

  • Owner changed from skyper to team
  • Status changed from needinfo to new

Made file available (temporary) at http://tmp.dgpsonline.eu/fr-test.osm.bz2.

comment:7 Changed 4 years ago by Gubaer

Strange.

Unauthorized (i.e. HTTP status code 401) isn't an expected status for this API call.

comment:8 Changed 4 years ago by Gubaer

(In [2478]) see #3887: java.lang.NullPointerException while uploading (OsmTransferException)

comment:9 follow-up: Changed 4 years ago by Gubaer

  • Resolution set to fixed
  • Status changed from new to closed

For some reason you got a 401 Unauthorized when updating a way. It's strange because you wouldn't have come so far unless you did authenticate successfully before.

I don't know what the ultimate cause for this exception was but I fixed the code in such a way that it won't throw a NPE anymore if it happens again.

comment:10 in reply to: ↑ 9 Changed 3 years ago by skyper

Replying to Gubaer:

For some reason you got a 401 Unauthorized when updating a way. It's strange because you wouldn't have come so far unless you did authenticate successfully before.

I don't know what the ultimate cause for this exception was but I fixed the code in such a way that it won't throw a NPE anymore if it happens again.

Sorry, I was offline for some days. I had some access problem with sudden breaks of the internet. Often it came up right away, that I did not notice the breaks.
Maybe I was logged in and uploading and then I had a short connection lost. Only way I can explain that.

cu skyper

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.