[Gvsig_usuarios] No se puede escribir

Néstor Ramires nramire1 en rosario.gov.ar
Vie Ene 27 14:03:13 CET 2012


No use pgAdmin, cambie a mano esos parametros y en
ver/gestor de conecciones a DB espaciales, me muestra la coneccion en amarillo, y no en gris, por lo que entiendo que si se conecta. A demas de no tirarme el error de coneccion que me tiraba antes. Asi que en cuanto a eso hemos avanzado


esto es lo que tira en la consola.

Can´t initialize writer: PostGIS Writer  com.hardcode.gdbms.driver.exceptions.InitializeWriterException: Can´t initialize writer: PostGIS Writer      com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGISWriter.initialize(PostGISWriter.java:111)     com.iver.cit.gvsig.ExportTo.saveToPostGIS(ExportTo.java:475)     com.iver.cit.gvsig.ExportTo.execute(ExportTo.java:340)     com.iver.andami.plugins.ExtensionDecorator.execute(ExtensionDecorator.java:89)     com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(MDIFrame.java:674)     javax.swing.AbstractButton.fireActionPerformed(Unknown Source)     javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)     javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)     javax.swing.DefaultButtonModel.setPressed(Unknown Source)     javax.swing.AbstractButton.doClick(Unknown Source)     javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)     javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unk
 nown  
Source)     java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)     java.awt.Component.processMouseEvent(Unknown Source)     javax.swing.JComponent.processMouseEvent(Unknown Source)     java.awt.Component.processEvent(Unknown Source)     java.awt.Container.processEvent(Unknown Source)     java.awt.Component.dispatchEventImpl(Unknown Source)     java.awt.Container.dispatchEventImpl(Unknown Source)     java.awt.Component.dispatchEvent(Unknown Source)     java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)     java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)     java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)     java.awt.Container.dispatchEventImpl(Unknown Source)     java.awt.Component.dispatchEvent(Unknown Source)     java.awt.EventQueue.dispatchEventImpl(Unknown Source)     java.awt.EventQueue.access$000(Unknown Source)     java.awt.EventQueue$1.run(Unknown Source)     java.awt.EventQueue$1.run(Unknown Source)      
java.security.AccessController.doPrivileged(Native Method)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.awt.EventQueue$2.run(Unknown Source)     java.awt.EventQueue$2.run(Unknown Source)     java.security.AccessController.doPrivileged(Native Method)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.awt.EventQueue.dispatchEvent(Unknown Source)     com.iver.andami.ui.AndamiEventQueue.dispatchEvent(AndamiEventQueue.java:58)     java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)     java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)     java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     java.awt.EventDispatchThread.pumpEvents(Unknown Source)     java.awt.EventDispatchThread.pumpEvents(Unknown Source)     java.awt.EventDispatchThread.run(Unknown Source)  
org.postgresql.util.PSQLException: ERROR: no existe la función addgeometrycolumn(character varying, unknown, unknown, integer, unknown, integer)      org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139)     org.postgresql.core.QueryExecutor.executeV3(QueryExecutor.java:152)     org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:100)     org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:43)     org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:517)     org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:50)     org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Statement.java:298)     com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGISWriter.initialize(PostGISWriter.java:87)     com.iver.cit.gvsig.ExportTo.saveToPostGIS(ExportTo.java:475)     com.iver.cit.gvsig.ExportTo.execute(ExportTo.java:340)      
com.iver.andami.plugins.ExtensionDecorator.execute(ExtensionDecorator.java:89)     com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(MDIFrame.java:674)     javax.swing.AbstractButton.fireActionPerformed(Unknown Source)     javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)     javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)     javax.swing.DefaultButtonModel.setPressed(Unknown Source)     javax.swing.AbstractButton.doClick(Unknown Source)     javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)     javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)     java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)     java.awt.Component.processMouseEvent(Unknown Source)     javax.swing.JComponent.processMouseEvent(Unknown Source)     java.awt.Component.processEvent(Unknown Source)     java.awt.Container.processEvent(Unknown Source)     java.awt.Component.dispatchEventImpl(Unknown Source)      
java.awt.Container.dispatchEventImpl(Unknown Source)     java.awt.Component.dispatchEvent(Unknown Source)     java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)     java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)     java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)     java.awt.Container.dispatchEventImpl(Unknown Source)     java.awt.Component.dispatchEvent(Unknown Source)     java.awt.EventQueue.dispatchEventImpl(Unknown Source)     java.awt.EventQueue.access$000(Unknown Source)     java.awt.EventQueue$1.run(Unknown Source)     java.awt.EventQueue$1.run(Unknown Source)     java.security.AccessController.doPrivileged(Native Method)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.awt.EventQueue$2.run(Unknown Source)     java.awt.EventQueue$2.run(Unknown Source)     java.security.AccessController.doPrivileged(Nati
 ve  
Method)     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)     java.awt.EventQueue.dispatchEvent(Unknown Source)     com.iver.andami.ui.AndamiEventQueue.dispatchEvent(AndamiEventQueue.java:58)     java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)     java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)     java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)     java.awt.EventDispatchThread.pumpEvents(Unknown Source)     java.awt.EventDispatchThread.pumpEvents(Unknown Source)     java.awt.EventDispatchThread.run(Unknown Source)


Ahora ejecute estos comandos en debian:

root en cat:/home/general# aptitude search postgis
p   libpostgis-java                 - geographic objects support for PostgreSQL
i   postgis                         - geographic objects support for PostgreSQL
p   postgresql-8.4-postgis          - geographic objects support for PostgreSQL
root en cat:/home/general# netstat -plnt | sort
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      694/portmap
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1237/sshd
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      15125/postgres
tcp        0      0 0.0.0.0:57981           0.0.0.0:*               LISTEN      730/rpc.statd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1556/exim4
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1066/cupsd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1556/exim4
tcp6       0      0 127.0.0.1:8005          :::*                    LISTEN      915/java
tcp6       0      0 ::1:631                 :::*                    LISTEN      1066/cupsd
tcp6       0      0 :::22                   :::*                    LISTEN      1237/sshd
tcp6       0      0 :::34645                :::*                    LISTEN      915/java
tcp6       0      0 :::5432                 :::*                    LISTEN      15125/postgres
tcp6       0      0 :::8080                 :::*                    LISTEN      915/java
tcp6       0      0 :::80                   :::*                    LISTEN      6745/apache2

veo postgres corriendo, pero no veo a postgis como servicio. ¿Es correcto que se muestre asi?



En Fri, 27 Jan 2012 09:42:49 -0300, Jorge Piera Llodrá <jpiera en gvsig.com> escribió:

> Cuando dices que "se conecta aparentemente" entiendo que es porque con
> el pgAdmin te has podido conectar sin problemas y ves las tablas de la
> base de datos. Hemos avanzado algo....
>
> ¿Puedes enviarnos el log de la aplicación?
>
> Un saludo,
> Jorge
>
> On 01/27/2012 01:35 PM, Néstor Ramires wrote:
>> Lo solucione con esto:
>>
>> Tengo el /etc/postgresql/8.4/main/postgresql.conf con la linea:
>> listen_address = '*'
>>
>> Y he editado el /etc/postgresql/8.4/main/pg_hba.conf con la línea:
>> host         all         all     192.168.97.0  255.255.255.0     md5
>>
>> Ahora, aparentemente, se conecta.
>> Abro un archivo shp voy a capa/exportar a/postgis y me tira el siguiente error
>>
>> Can't initialize writer: PostGIS Writer
>>
>>
>>
>> Este es el contenido de mi /etc/postgresql/8.4/main/pg_hba.conf
>>
>> # "local" is for Unix domain socket connections only
>> local   all         all                               ident
>> # IPv4 local connections:
>> #host    all         all         127.0.0.1/32          md5
>> host    all         all         192.168.97.149    255.255.255.0    trust
>> # IPv6 local connections:
>> host    all         all         ::1/128               md5
>>
>> La LAN tiene ip 192.168.97.*
>> 192.168.97.149 es la pc en la que esta instalado postgres
>>
>> y me sigue tirando el mismo error
>>
>> En Thu, 26 Jan 2012 14:17:10 -0300, Jorge Piera Llodrá<jpiera en gvsig.com>  escribió:
>>
>>
>>> Hola.
>>>
>>> Creo que lo que buscas es [1].
>>>
>>> Te recomiendo que intentes conectar primero a tu base de datos postgres
>>> con el pgAdmin [2] (o equivalente) y una vez que ya tengas claro los
>>> parámetros de conexión utilices gvSIG.
>>>
>>> [1] http://www.postgresql.org/docs/8.4/interactive/auth-pg-hba-conf.html
>>> [2] http://www.pgadmin.org/
>>>
>>> On 01/26/2012 05:10 PM, Néstor Ramires wrote:
>>>
>>>> Tengo instalado en un debian
>>>> postgres 8-4
>>>> postgis 1.5
>>>> nuevito solo he creado un unsuario postgres y una base.
>>>>
>>>> intento conectar gvsig con postgres pero al ir a
>>>> ver/gestor de conecciones
>>>> añadir
>>>>
>>>> nombre: base prueba
>>>> postgis
>>>> port: por defecto
>>>> ip de la pc: ***.***.***.***
>>>> nombre de la db: prueba
>>>>
>>>> le doy a conectar y me aparece el siguiente error
>>>>
>>>> error de conexion: connection refused check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections
>>>> ¿Que tengo que habilitar para que esto funciones?
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


-- 
   M.M.O. Néstor Ramires
   Departamento de Cartografía Digital
   Dirección General de Topografía y Catastro
   Municipalidad de Rosario


Más información sobre la lista de distribución gvSIG_usuarios