Good Afternoon all. I am new to osmosis but have been spending a lot of time messing around with it. I finally got my process down to creating a postgres, Running the pgsnapshot_schema_0.6, actions, bbox and linestring commands to bulild the schema. I have postgis and hstore installed. I have successfully imported great britain and belgium using this command below but for respective pbf files.

osmosis --read-pbf file=/N:/RawData/OSM/Great_Britain/great-britain-latest.osm.pbf --write-pgsql host=localhost database=great_britain user=postgres

My issue is on the read xml change files and write pgsql change commands. i have tried the following commands for both db and downloading the change files from geofabrik. How ever i always run into the same exact error every single time. It appears Java or Osmoisis is not finding postgres and doesnt know how to execute the query. I found similar issues online but NO ONE to explain this one because i feel pretty good about having all other things set up correctly. If someone can help resolve this error it would be greatly appreciated!!!

N:\RawData\OSM\Belgium>osmosis --read-xml-change file=N:/RawData/OSM/Belgium/bel_diff.osc.gz outPipe(mypipe) --write-pgsql-change host=localhost database=belgium user=postgres password=postgres inPipe(mypipe) Sep 26, 2017 1:47:07 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Osmosis Version 0.45 Sep 26, 2017 1:47:07 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Preparing pipeline. Sep 26, 2017 1:47:08 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Launching pipeline execution. Sep 26, 2017 1:47:08 PM org.openstreetmap.osmosis.core.Osmosis run INFO: Pipeline executing, waiting for completion. Sep 26, 2017 1:47:09 PM org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion SEVERE: Thread for task 1-read-xml-change failed org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [UPDATE nodes SET id = ?, version = ?, user_id = ?, tstamp = ?, changeset_id = ?, tags = ?, geom = ? WHERE id = ?]; nested exception is org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.util.HashMap. Use setObject() with an explicit Types value to specify the type to use. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:99) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:645) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:866) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:890) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:287) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update(NamedParameterJdbcTemplate.java:292) at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.EntityDao.modifyEntity(EntityDao.java:132) at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.NodeDao.modifyEntity(NodeDao.java:65) at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.ChangeWriter.write(ChangeWriter.java:126) at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.ActionChangeWriter.process(ActionChangeWriter.java:54) at org.openstreetmap.osmosis.core.container.v0_6.NodeContainer.process(NodeContainer.java:58) at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlChangeWriter.process(PostgreSqlChangeWriter.java:101) at org.openstreetmap.osmosis.xml.v0_6.impl.ChangeSourceElementProcessor$ChangeSinkAdapter.process(ChangeSourceElementProcessor.java:144) at org.openstreetmap.osmosis.xml.v0_6.impl.NodeElementProcessor.end(NodeElementProcessor.java:139) at org.openstreetmap.osmosis.xml.v0_6.impl.OsmChangeHandler.endElement(OsmChangeHandler.java:94) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.openstreetmap.osmosis.xml.v0_6.XmlChangeReader.run(XmlChangeReader.java:90) at java.lang.Thread.run(Unknown Source) Caused by: org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of java.util.HashMap. Use setObject() with an explicit Types value to specify the type to use.

asked 26 Sep '17, 19:49

Asinger321's gravatar image

Asinger321
11112
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×230
×7

question asked: 26 Sep '17, 19:49

question was seen: 898 times

last updated: 26 Sep '17, 19:49

powered by OSQA