#483 closed defect (fixed)
Precondition failed after fixing intersected ways
Reported by: | Owned by: | framm | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: |
Description
I fixed some validator errors and warnings:
- double nodes
- intersected ways
When I tried to upload the data, the upload aborts with an exception saying "Precondition failed".
I tried to find and fix the way by splitting it into parts until I found the bad part. The last part was a node and a way with just this node. Both of them where deleted.
Maybe this is related with #177 (and maybe #237 too)
upload to: http://www.openstreetmap.org/api/0.5/node/104050921 got return: 412 with id 104050921 <?xml version='1.0' encoding='UTF-8'?> <osm version='0.5' generator='JOSM'> <node id='104050921' timestamp='2007-11-09T13:53:26+00:00' user='bobo11' visible='true' lat='47.6054856' lon='8.4947361' /> </osm> java.lang.RuntimeException: 412 Precondition Failed at org.openstreetmap.josm.io.OsmServerWriter.sendRequest(OsmServerWriter.java:192) at org.openstreetmap.josm.io.OsmServerWriter.visit(OsmServerWriter.java:90) at org.openstreetmap.josm.data.osm.Node.visit(Node.java:41) at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:73) at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.java:151) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:84) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) org.xml.sax.SAXException: An error occoured: 412 Precondition Failed at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.java:78) at org.openstreetmap.josm.actions.UploadAction$2.realRun(UploadAction.java:151) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:84) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595)
Attachments (0)
Change History (5)
comment:1 by , 17 years ago
follow-up: 4 comment:3 by , 17 years ago
Generally speaking, you get an 412 error when you want to delete something that is still used by something else, e.g. you download a bounding box, and then remove some of the superfluous nodes in a way, but don't realize that these were actually intersections because the server doesn't return ways outside the bounding box you requested.
Now, when you're fixing duplicate nodes, exactly that might happen.
As for the 0-node ways: Until now, the validator plugin would show incomplete ways that are referenced by relations, but not returned by the server, as errors.
comment:4 by , 17 years ago
Replying to Gabriel Ebner <ge@gabrielebner.at>:
Generally speaking, you get an 412 error when you want to delete something that is still used by something else, e.g. you download a bounding box, and then remove some of the superfluous nodes in a way, but don't realize that these were actually intersections because the server doesn't return ways outside the bounding box you requested.
Ok, that makes sense.
Now, when you're fixing duplicate nodes, exactly that might happen.
As for the 0-node ways: Until now, the validator plugin would show incomplete ways that are referenced by relations, but not returned by the server, as errors.
Good to know. It then seems not to be a bug (at least not a JOSM bug, more a validator issue).
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be fixed in newer versions. Reopen report, when still existing.
Maybe it's because of the way with only a single node. This time I've had the same error when I fixed an empty way without any nodes (with validator plugin):