[Gvsig_english] gvSIG 1.1.2: Cannot load PostGIS-Layer

Juan Lucas Dominguez Rubio jldominguez at prodevelop.es
Sat Jul 18 20:06:50 CEST 2009


Hello, Johannes:

I had the same problem when I did a test with OSM data. The problem is that the gvSIG Postgis driver does not use quotes for column names, therefore if a column has a name which corresponds to a Postgres/Postgis reserved word, then it does not work. The OSM data has a column called 'natural' which is a reserved word. If you access your database with some database administration software and remove the column 'natural' from that table, perhaps it will work.

Regards,

Juan Lucas Domínguez Rubio
---
Prodevelop SL, Valencia (España)
0° 22' 49.62" W, 39° 28' 25.45" N
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es
---



-----Original Message-----
From: gvsig_internacional-bounces at listserv.gva.es on behalf of Johannes Valenta
Sent: Sat 18/07/2009 16:36
To: Gvsig_internacional at listserv.gva.es
Subject: [Gvsig_english] gvSIG 1.1.2: Cannot load PostGIS-Layer
 
Hi List,

I am using gvSIG 1.1.2 and I am trying to load a PostGIS Layer.
Unfortunately it does not work. I am not sure where the error occurs or what
I can improve at the PostGIS-DB to make the connection work. Any hints?
See the log file below.

Thanks,

Johannes

INFO AWT-EventQueue-1
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver - SQL> SELECT
ASBINARY(way, 'XDR'), osm_id, access, admin_level, aerialway, aeroway,
amenity, area, bicycle, bridge, boundary, building, cutting, disused,
embankment, foot, highway, horse, junction, landuse, layer, learning,
leisure, man_made, military, motorcar, name, natural, oneway, power,
power_source, place, railway, ref, religion, residence, route, sport,
tourism, tracktype, tunnel, waterway, width, wood, z_order, way_area, id
FROM public.planet_osm_line  ORDER BY id
ERROR AWT-EventQueue-1
com.prodevelop.cit.gvsig.vectorialdb.wizard.WizardVectorialDB - While
creating db layer: FEHLER: Syntaxfehler bei »,«

com.iver.cit.gvsig.fmap.drivers.DBException: FEHLER: Syntaxfehler bei »,«

    at
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver.setData(Unknown
Source)
    at
com.prodevelop.cit.gvsig.vectorialdb.wizard.WizardVectorialDB.getLayer(Unknown
Source)
    at com.iver.cit.gvsig.AddLayer.loadGenericWizardPanelLayers(Unknown
Source)
    at com.iver.cit.gvsig.AddLayer.addLayers(Unknown Source)
    at com.iver.cit.gvsig.AddLayer.execute(Unknown Source)
    at com.iver.andami.plugins.ExtensionDecorator.execute(Unknown Source)
    at com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(Unknown Source)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.iver.andami.ui.AndamiEventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20090718/c1bf1090/attachment.htm 


More information about the Gvsig_internacional mailing list