﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3124	NullPointerException after unsuccessful trials to upload data	Radomír Černoch <radomir.cernoch@…>	team	"While uploading a large amount of data, the API server sometimes responds ""Internal Server Error"" (this is still OK). After 6 such responds, JOSM shows ""NullPointerException"" instead of some meaningful message.

The problem is reproducible always during high traffic (18:00 GMT) and big file with edits.

Output of stdout+stderr:

{{{
GET http://www.openstreetmap.org/api/capabilities... OK
Communications with http://www.openstreetmap.org/api established using protocol version 0.6
PUT http://www.openstreetmap.org/api/0.6/changeset/create... OK
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
POST http://www.openstreetmap.org/api/0.6/changeset/1967013/upload... Internal Server Error
Error body: <?xml version=""1.0"" encoding=""iso-8859-1""?>
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN""
         ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en"">
 <head>
  <title>500 - Internal Server Error</title>
 </head>
 <body>
  <h1>500 - Internal Server Error</h1>
 </body>
</html>

PUT http://www.openstreetmap.org/api/0.6/changeset/1967013/close... OK
org.openstreetmap.josm.io.OsmTransferException: java.lang.NullPointerException
        at org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:475)
        at org.openstreetmap.josm.io.OsmApi.uploadDiff(OsmApi.java:339)
        at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:109)
        at org.openstreetmap.josm.actions.UploadAction$1UploadDiffTask.realRun(UploadAction.java:233)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:62)
        at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:116)
        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 org.openstreetmap.josm.io.OsmApi.sendRequest(OsmApi.java:458)
        ... 8 more
}}}"	defect	closed	major		Core	latest	fixed		
