Opened 6 years ago

#4689 new defect

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

Reported by: ysa Owned by: bretth
Priority: minor Milestone:
Component: osmosis Version:
Keywords: Cc:

Description

Code

PostgreSqlDatasetReader reader = new  

PostgreSqlDatasetReader(loginCredentials, preferences);

DatasetContext dbContext = reader.createReader();

dbContext.getRelationManager().getEntity(relationId) 

produced ERROR “column "entity_id" does not exist”

DB - PostgreSQL 9.2

Exception in thread "main" org.openstreetmap.osmosis.core.OsmosisRuntimeException: Query failed for relation_members 764.
	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.RelationDao.loadFeatures(RelationDao.java:45)
	at org.openstreetmap.osmosis.pgsimple.v0_6.impl.RelationDao.loadFeatures(RelationDao.java:19)
	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.readRelations(HelloOSMDbReader.java:97)
	at org.xxx.tests.osmosis.HelloOSMDbReader.main(HelloOSMDbReader.java:27)
Caused by: org.postgresql.util.PSQLException: ERROR: column "entity_id" does not exist 
  Position: 113
	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.