Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to GeoPackage fails on overwriting #410

Open
MarkusHesse42 opened this issue Nov 23, 2017 · 0 comments
Open

Export to GeoPackage fails on overwriting #410

MarkusHesse42 opened this issue Nov 23, 2017 · 0 comments

Comments

@MarkusHesse42
Copy link

MarkusHesse42 commented Nov 23, 2017

When I export a table from geogig repository to GeoPackage everything runs fine:

geogig geopkg export -i test_text test_text

Exporting from test_text to test_text...
test_text exported successfully to test_text

Exporting repository metadata from 'HEAD:test_text' (commit c6f6b562617b581401d7724a42095f9d1a684a17)...

Creating audit metadata for table 'test_text'

If I now try to export a second time (and add the parameter -o for overwrite), I get an error:

geogig geopkg export -i -o test_text test_text

Exporting from test_text to test_text...
test_text exported successfully to test_text

Exporting repository metadata from 'HEAD:test_text' (commit c6f6b562617b581401d7724a42095f9d1a684a17)...

Creating audit metadata for table 'test_text'
Unable to export: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (trigger 'test_text_audit_insert' already exists)

In geogig.log there is the following error message:

2017-11-23 13:40:45,634 ERROR [main] o.l.g.c.GeogigCLI [GeogigCLI.java:390] Unable to export: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (trigger 'test_text_audit_insert' already exists)
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (trigger 'test_text_audit_insert' already exists)
        at org.sqlite.core.DB.newSQLException(DB.java:909) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.core.DB.newSQLException(DB.java:921) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.core.DB.throwex(DB.java:886) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.core.NativeDB.prepare_utf8(Native Method) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.core.NativeDB.prepare(NativeDB.java:127) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.core.DB.prepare(DB.java:227) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60) ~[sqlite-jdbc-3.20.0.jar:na]
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) ~[commons-dbcp-1.4.jar:1.4]
        at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) ~[commons-dbcp-1.4.jar:1.4]
        at org.locationtech.geogig.geotools.geopkg.GeopkgGeogigMetadata.createInsertTrigger(GeopkgGeogigMetadata.java:342) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.GeopkgGeogigMetadata.createAuditTable(GeopkgGeogigMetadata.java:296) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.GeopkgGeogigMetadata.createAudit(GeopkgGeogigMetadata.java:179) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.InterchangeFormat.createAuditLog(InterchangeFormat.java:212) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.InterchangeFormat.export(InterchangeFormat.java:179) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.GeopkgAuditExport._call(GeopkgAuditExport.java:59) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.geopkg.GeopkgAuditExport._call(GeopkgAuditExport.java:24) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.repository.AbstractGeoGigOp.call(AbstractGeoGigOp.java:154) ~[geogig-api-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
        at org.locationtech.geogig.geotools.cli.geopkg.GeopkgExport.runInternal(GeopkgExport.java:91) ~[geogig-geotools-1.3-SNAPSHOT.jar:1.3-SNAPSHOT]
sebastian-r-schmidt added a commit to sebastian-r-schmidt/geogig that referenced this issue Nov 3, 2018
…tiontech#410

Signed-off-by: sebastian-r-schmidt <Schmidt.Sebastian2@swm.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant