Opened 5 years ago

#4690 new defect

Wrong SQL Statement inside dbContext. dbContext.getWayManager().getEntity(relationId)

Reported by: ysa Owned by: brett@…
Priority: minor Milestone:
Component: osmosis Version:
Keywords: Cc:

Description

Code

DatabasePreferences preferences = new DatabasePreferences(false,true);
	
PostgreSqlDatasetReader reader = new  PostgreSqlDatasetReader(loginCredentials, preferences);
	
reader.createReader().getWayManager().getEntity(wayId);

produced ERROR: column "entity_id" does not exist

Exception in thread "main" org.openstreetmap.osmosis.core.OsmosisRuntimeException: Query failed for way_nodes 4078548.
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.EntityFeatureDao.getAll(EntityFeatureDao.java:87)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.EntityFeatureDao.getAllRaw(EntityFeatureDao.java:113)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.WayDao.loadFeatures(WayDao.java:67)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.WayDao.loadFeatures(WayDao.java:22)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.EntityDao.getEntity(EntityDao.java:147)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.PostgreSqlEntityManager.getEntity(PostgreSqlEntityManager.java:104)
	at org.xxx.tests.osmosis.HelloOSMDbReader.readWays(HelloOSMDbReader.java:73)
	at org.xxx.tests.osmosis.HelloOSMDbReader.main(HelloOSMDbReader.java:27)
Caused by: org.postgresql.util.PSQLException: ERROR: column "entity_id" does not exist
  Line: 73
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.EntityFeatureDao.getAll(EntityFeatureDao.java:74)
	... 7 more

Change History (0)

Note: See TracTickets for help on using tickets.