gvSIG bugs #4539
falla al exportar a postgresql una capa que en el nombre lleva "-"
Status: | Closed | % Done: | 0% | |
---|---|---|---|---|
Priority: | Normal | Spent time: | - | |
Assignee: | ||||
Category: | - | |||
Target version: | 2.4.0-2829 (rev. org.gvsig.desktop-2.0.195) | |||
Severity: | Minor | Add-on version: | ||
gvSIG version: | 2.4.0 | Add-on build: | ||
gvSIG build: | 2827 | Add-on resolve version: | ||
Operative System: | Linux | Add-on resolve build: | ||
Keywords: | Proyecto: | |||
Has patch: | Hito: | |||
Add-on name: | Unknown |
Description
he cargado el shape "municipios-4326" con los municipios de navarra.
Cuando intento exportarlo a PostgreSQL falla.
Por la consola saca el error:
DEBUG 269028 [Thread-13] (AbstractConnectionOperation.java:58) - preparing execution of CreateTableOperation. DEBUG 269040 [Thread-13] (AbstractConnectionOperation.java:69) - Excuting operation CreateTableOperation. DEBUG 269043 [Thread-13] (JDBCUtils.java:32) - execute SQL: CREATE TABLE "gis"."public"."municipios-4326" ("id_muni" BIGINT DEFAULT '0' NOT NULL, "pk" SERIAL PRIMARY KEY ) DEBUG 269626 [Thread-13] (JDBCUtils.java:32) - execute SQL: SELECT AddGeometryColumn('public' , 'municipios-4326' , 'geometry', 4326 , 'MULTIPOLYGON' , 2, true) DEBUG 269838 [Thread-13] (JDBCUtils.java:32) - execute SQL: CREATE INDEX idx_municipios-4326geometry ON "gis"."public"."municipios-4326" USING GIST (geometry) WARN 269903 [Thread-13] (ExporrtoJDBCService.java:341) - Can't export data. java.lang.RuntimeException: Can't perform operation 'CreateTableOperation'. at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform_operation(AbstractConnectionOperation.java:77) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform(AbstractConnectionOperation.java:41) at org.gvsig.fmap.dal.store.jdbc2.spi.JDBCServerExplorerBase.add(JDBCServerExplorerBase.java:354) at org.gvsig.exportto.swing.prov.jdbc.ExporrtoJDBCService.createTable(ExporrtoJDBCService.java:149) at org.gvsig.exportto.swing.prov.jdbc.ExporrtoJDBCService.export(ExporrtoJDBCService.java:197) at org.gvsig.exportto.swing.impl.DefaultJExporttoServicePanel$Export.run(DefaultJExporttoServicePanel.java:284) Caused by: org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException: An JDBC driver exception was throw at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.performCreateTable(CreateTableOperation.java:109) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.perform(CreateTableOperation.java:53) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform_operation(AbstractConnectionOperation.java:70) ... 5 more Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "-" Position: 28 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at org.gvsig.fmap.dal.store.jdbc2.JDBCUtils.execute(JDBCUtils.java:33) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.performCreateTable(CreateTableOperation.java:106) ... 7 more WARN 269904 [Thread-13] (DefaultJExporttoServicePanel.java:286) - Problems exporting the data (layer=municipios-4326). org.gvsig.exportto.ExporttoServiceException: An error has been produced exporting a store at org.gvsig.exportto.swing.prov.jdbc.ExporrtoJDBCService.export(ExporrtoJDBCService.java:343) at org.gvsig.exportto.swing.impl.DefaultJExporttoServicePanel$Export.run(DefaultJExporttoServicePanel.java:284) Caused by: java.lang.RuntimeException: Can't perform operation 'CreateTableOperation'. at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform_operation(AbstractConnectionOperation.java:77) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform(AbstractConnectionOperation.java:41) at org.gvsig.fmap.dal.store.jdbc2.spi.JDBCServerExplorerBase.add(JDBCServerExplorerBase.java:354) at org.gvsig.exportto.swing.prov.jdbc.ExporrtoJDBCService.createTable(ExporrtoJDBCService.java:149) at org.gvsig.exportto.swing.prov.jdbc.ExporrtoJDBCService.export(ExporrtoJDBCService.java:197) ... 1 more Caused by: org.gvsig.fmap.dal.store.jdbc.exception.JDBCSQLException: An JDBC driver exception was throw at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.performCreateTable(CreateTableOperation.java:109) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.perform(CreateTableOperation.java:53) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.AbstractConnectionOperation.perform_operation(AbstractConnectionOperation.java:70) ... 5 more Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "-" Position: 28 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264) at org.gvsig.fmap.dal.store.jdbc2.JDBCUtils.execute(JDBCUtils.java:33) at org.gvsig.fmap.dal.store.jdbc2.spi.operations.CreateTableOperation.performCreateTable(CreateTableOperation.java:106) ... 7 more
Estaria bien añadir al paso de la exportacion Opciones del nombre de tabla y campos un check mas que estubiese marcado por defecto para que sustituyese los "-" por "_".
Associated revisions
History
#1
Updated by Joaquín del Cerro Murciano about 7 years ago
En el paso que pide el nombre de tabla, he corregido el que me ofrece cambiando "-" por "_" y funciona.
#2
Updated by Joaquín del Cerro Murciano about 7 years ago
- Target version changed from 2.4.0-2850-final (rev. org.gvsig.desktop-2.0.220) to 2.4.0-2829 (rev. org.gvsig.desktop-2.0.195)
- Assignee set to Joaquín del Cerro Murciano
#3
Updated by Joaquín del Cerro Murciano about 7 years ago
- Status changed from New to Fixed
#4
Updated by Álvaro Anguix about 7 years ago
- Status changed from Fixed to Closed