NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I successfully installed the rail port following the official tutorial on ubuntu but i can't import my country in my db. Somewhere else i read that this is not the user's fault but more of an inconsistency in my .osm file. But if so, then how can i avoid it? Is there a way to make osmosis ignore these errors. How do other people install the rail port with such things going on?

INFO: Pipeline executing, waiting for completion.
    Oct 25, 2011 10:01:41 AM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion
SEVERE: Thread for task 1-read-xml-0.6 failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current way nodes.
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentWays(
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentTables(
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.complete(
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey"
  Detail: Key (node_id)=(26069636) is not present in table "current_nodes".
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(
    at org.postgresql.core.v3.QueryExecutorImpl.execute(
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
    at org.openstreetmap.osmosis.apidb.v0_6.ApidbWriter.populateCurrentWays(
    ... 4 more
Oct 25, 2011 10:01:41 AM org.openstreetmap.osmosis.core.Osmosis main
SEVERE: Execution aborted.
org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.
    at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(
    at org.openstreetmap.osmosis.core.Osmosis.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(
    at org.codehaus.classworlds.Launcher.main(

asked 25 Oct '11, 08:18

alexz's gravatar image

accept rate: 0%

edited 26 Oct '11, 07:45

It's an inconsistency in your .osm file, as you put in your question.

The most likely cause of this is that you have an extract which was created with the standard osmosis settings - which means that if a way references nodes outside of the bbox requested, the extra nodes are not included and so the extract has "incomplete" ways. Or the same thing with relations.

See the Detailed Usage description of the bbox tasks of osmosis for more details.

To solve this, you will either need to obtain an extract with completed ways and relations, or make your own with the "completeWays" and "completeRelations" flags set to true. Alternatively, you can use the "clipIncompleteEntities" to alter the ways and relations in order that they won't refer to missing entities.

permanent link

answered 26 Oct '11, 09:47

Andy%20Allan's gravatar image

Andy Allan
accept rate: 28%

Thanks i'll try that as soon as possible. Meanwhile, i can add that i was importing a country downloaded from . Do you happen to know if they practice such things as not including the extra nodes?

(26 Oct '11, 10:16) alexz

I believe that's the case. You can try downloading from instead - the extracts from there have completeWays set to true.

(26 Oct '11, 10:48) Andy Allan

I beleve geofabrik uses clipIncompleteEntities set and not completeWays. This means that you can not export the geofabrik data back to OSM.

(26 Oct '11, 11:25) Gnonthgol ♦

That's not the case - I checked with frederik before posting, and that matches what he's previously said on the mailing lists.

(26 Oct '11, 11:59) Andy Allan

Geofabrik has moved the planet splitting from osmosis to a program called 'history-splitter'.

(26 Oct '11, 12:13) ajoessen

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Oct '11, 08:18

question was seen: 7,453 times

last updated: 26 Oct '11, 12:13

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum