osmosis 0.45 read-pgsql error: java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to java.util.Map: #5404
Comments
Author: brett[at]bretth.com Thanks for the report. Surprising error, I'm not sure what's changed in this space. I'll look into it as soon as I can find time. |
Author: brett[at]bretth.com I can't reproduce this error. Perhaps there is something unusual in the database. In order to diagnose the problem, can you please make the following code modification, recompile, and try again? It will check the type of the tags field and throw an exception containing the data type received and the entity id being processed. Hopefully it will help us narrow down the problem. Insert the following code at line 81 of file osmosis-pgsnapshot/src/main/java/org/openstreetmap/osmosis/pgsnapshot/v0_6/impl/EntityRowMapper.java
|
Author: brett[at]bretth.com From #5407, perhaps this is postgres version related. That defect also occurs on postgres 9.1. I can't reproduce it on postgres 9.3.9. One difference between 0.44.1 and 0.45 is the postgres JDBC driver version. Are you able to try recompiling with the older postgres JDBC driver? Modify gradle.properties and modify the following line:
to be
Then recompile (i.e. ./gradlew assemble). |
Author: jjoe64 I have the same issue. When reading from pgsql I get that error with current version (0.45 or current git branch). I also tried to change the version of postgres driver like mentioned by brett@ but no effect. This is my command:
When I checkout the v0.44.1 I works perfectly. |
Author: brett[at]bretth.com This comment by Jocelyn on ticket 5407 might be the key to your problem: It seems to be related to the postgis version. Osmosis is using a postgis 2 library. Are you still using postgis 1.x? |
Author: sjones925 I have this issue as well with Osmosis 0.45 and
And the stacktrace:
|
Author: sjones925 If anyone else runs into this, my colleague found that removing |
Author: aviv.rosenberg[at]gmail.com Ran into the same issue with 0.45. It seems that in version 0.44.1, an old postgresql client library came back, causing this problem:
|
Author: brett[at]bretth.com This issue should be resolved in 0.46 ... finally. The duplicate postgresql libraries no longer exist. |
Reporter: Piskvor
[Submitted to the original trac issue database at 7.29pm, Sunday, 12th June 2016]
On a Ubuntu 12.04 box, with Oracle Java 8 (1.8.0_91-b14, 64-bit), I have a local copy of Czech Republic OSM data, updated from http://download.geofabrik.de/europe/czech-republic-updates via --rri and stored in pgSQL 9.1 database; have been successfully building maps from that (i.e. this part works).
Config:
Sequence state as of now:
Updating through this command:
A few days ago, I have updated osmosis from 0.44.1 to 0.45; built a few maps in the meantime, all worked. Today, after the rri update, I started getting a ClassCastException when reading the database, after about 2 real-minutes of runtime (for a task which usually finishes under a minute). When using 0.44.1-SNAPSHOT (built from commit 90770d38e452678ac672a43d0182432b46925e0a), I never get the exception; when using 0.45, I always get it. The maps generated using 0.44.1 seem to be working correctly.
Tried a different bounding box, same results: works with 0.44.1, not with 0.45:
The equivalent process using a PBF extract of the same data finishes successfully, and the results seem to be functionally identical:
Files generated via 0.44.1 can be downloaded at http://maps.piskvor.org/ - nothing unusual in the daily updates or in the generated data, as far as I can tell.
The text was updated successfully, but these errors were encountered: