[jdbc-spatialite] Datastore removeSchema doesn't delete geometry_columns record for dropped table

Description

So:

spatialiteDatastore.removeSchema(typeName); // Remove apparently OK, but spatialiteDatastore.createSchema(featureTypeWithSameName); // Recreating it fails with: Exception in thread "main" java.io.IOException: Error occurred creating table at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:757) at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:144) Caused by: java.sql.SQLException: columns f_table_name, f_geometry_column are not unique at org.spatialite.NativeDB.throwex(NativeDB.java:213) at org.spatialite.NativeDB._exec(Native Method) at org.spatialite.Stmt.executeUpdate(Stmt.java:152) at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) at org.geotools.data.spatialite.SpatiaLiteDialect.postCreateTable(SpatiaLiteDialect.java:414) at org.geotools.jdbc.JDBCDataStore.createSchema(JDBCDataStore.java:754) ... 4 more

Environment

None

Activity

Show:

Jody Garnett July 21, 2016 at 5:18 PM

So the the above pull request has been merged - can we mark this issue as resolved?

Oscar Fonts October 22, 2015 at 11:37 AM

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created October 22, 2015 at 10:48 AM
Updated July 21, 2016 at 5:19 PM
Resolved July 21, 2016 at 5:19 PM

Flag notifications