This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

OsmosisRuntimeException: Cannot represent -1 as a char.

0

Hi, extracting a polygon from postgres via osmosis fails:

/home/osm/osmosis -v --read-pgsql database="osm" user="osm" password="secret" validateSchemaVersion=no --dataset-bounding-box bottom=50.0 left=8.6 top=50.1 right=8.7 --write-xml db.osm

FINE: Rolling back JDBC transaction on Connection [jdbc:postgresql://localhost/osm_rn, UserName=osm, PostgreSQL Native Driver] Jun 13, 2011 10:24:13 PM org.springframework.jdbc.datasource.DataSourceTransactionManager doCleanupAfterCompletion FINE: Releasing JDBC Connection [jdbc:postgresql://localhost/osm_rn, UserName=osm, PostgreSQL Native Driver] after transaction Jun 13, 2011 10:24:13 PM org.springframework.jdbc.datasource.DataSourceUtils doReleaseConnection FINE: Returning JDBC Connection to DataSource Jun 13, 2011 10:24:13 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion SEVERE: Thread for task 1-read-pgsql failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent -1 as a char. at org.openstreetmap.osmosis.core.util.IntAsChar.intToChar(IntAsChar.java:35)

Any hints?

This question is marked "community wiki".

asked 13 Jun '11, 22:27

gwk's gravatar image

gwk
36225
accept rate: 0%

edited 19 Jun '11, 09:21


One Answer:

4

The osmosis-dev mailing list is a good place to ask such questions.

Specifically, are you using Osmosis 0.39 or an earlier version? There has been a change affecting the internal serialization of objects in r25674 which is included in 0.39 but not older versions of Osmosis. This change has fixed the "Cannot represent -1 as a char" bug in a different scenario; maybe it helps for your case as well. (Mailing list article.)

answered 13 Jun '11, 22:36

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 14 Jun '11, 18:17

Extracting a polygon via osmosis-0.39 works fine. Tried osmosis-0.38 before.

(14 Jun '11, 18:11) gwk

Source code available on GitHub .