Modify

Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#483 closed defect (fixed)

Precondition failed after fixing intersected ways

Reported by: andy@… 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 andy@…, 17 years ago

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):

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.5' generator='JOSM'>
</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:105)
        at org.openstreetmap.josm.data.osm.Way.visit(Way.java:23)
        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)

comment:2 by andy@…, 17 years ago

It seems to occure only when fixing 0-node ways with validator plugin.

comment:3 by Gabriel Ebner <ge@…>, 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.

in reply to:  3 comment:4 by anonymous, 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 anonymous, 17 years ago

Resolution: fixed
Status: newclosed

Should be fixed in newer versions. Reopen report, when still existing.

Modify Ticket

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