Hi Juan,<br><br>thank you for the solution! When skipping the &quot;natural&quot;column gvSIG flawlessly loads any layer. It&#39;s so easy if you know it ;-)<br><br>Best,<br><br>Johannes<br><br><br><div class="gmail_quote">
2009/7/18 Juan Lucas Dominguez Rubio <span dir="ltr">&lt;<a href="mailto:jldominguez@prodevelop.es">jldominguez@prodevelop.es</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">







<div>


<p><font size="2">Hello, Johannes:<br>
<br>
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 &#39;natural&#39; which is a reserved word. If you access your database with some database administration software and remove the column &#39;natural&#39; from that table, perhaps it will work.<br>

<br>
Regards,<br>
<br>
Juan Lucas Domínguez Rubio<br>
---<br>
Prodevelop SL, Valencia (España)<br>
0° 22&#39; 49.62&quot; W, 39° 28&#39; 25.45&quot; N<br>
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68<br>
<a href="http://www.prodevelop.es" target="_blank">http://www.prodevelop.es</a><br>
---<div><div></div><div class="h5"><br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:gvsig_internacional-bounces@listserv.gva.es" target="_blank">gvsig_internacional-bounces@listserv.gva.es</a> on behalf of Johannes Valenta<br>
Sent: Sat 18/07/2009 16:36<br>
To: <a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
Subject: [Gvsig_english] gvSIG 1.1.2: Cannot load PostGIS-Layer<br>
<br>
Hi List,<br>
<br>
I am using gvSIG 1.1.2 and I am trying to load a PostGIS Layer.<br>
Unfortunately it does not work. I am not sure where the error occurs or what<br>
I can improve at the PostGIS-DB to make the connection work. Any hints?<br>
See the log file below.<br>
<br>
Thanks,<br>
<br>
Johannes<br>
<br>
INFO AWT-EventQueue-1<br>
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver - SQL&gt; SELECT<br>
ASBINARY(way, &#39;XDR&#39;), osm_id, access, admin_level, aerialway, aeroway,<br>
amenity, area, bicycle, bridge, boundary, building, cutting, disused,<br>
embankment, foot, highway, horse, junction, landuse, layer, learning,<br>
leisure, man_made, military, motorcar, name, natural, oneway, power,<br>
power_source, place, railway, ref, religion, residence, route, sport,<br>
tourism, tracktype, tunnel, waterway, width, wood, z_order, way_area, id<br>
FROM public.planet_osm_line  ORDER BY id<br>
ERROR AWT-EventQueue-1<br>
com.prodevelop.cit.gvsig.vectorialdb.wizard.WizardVectorialDB - While<br>
creating db layer: FEHLER: Syntaxfehler bei »,«<br>
<br>
com.iver.cit.gvsig.fmap.drivers.DBException: FEHLER: Syntaxfehler bei »,«<br>
<br>
    at<br>
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver.setData(Unknown<br>
Source)<br>
    at<br>
com.prodevelop.cit.gvsig.vectorialdb.wizard.WizardVectorialDB.getLayer(Unknown<br>
Source)<br>
    at com.iver.cit.gvsig.AddLayer.loadGenericWizardPanelLayers(Unknown<br>
Source)<br>
    at com.iver.cit.gvsig.AddLayer.addLayers(Unknown Source)<br>
    at com.iver.cit.gvsig.AddLayer.execute(Unknown Source)<br>
    at com.iver.andami.plugins.ExtensionDecorator.execute(Unknown Source)<br>
    at com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(Unknown Source)<br>
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)<br>
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)<br>
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)<br>
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)<br>
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown<br>
Source)<br>
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)<br>
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)<br>
    at java.awt.Component.processMouseEvent(Unknown Source)<br>
    at javax.swing.JComponent.processMouseEvent(Unknown Source)<br>
    at java.awt.Component.processEvent(Unknown Source)<br>
    at java.awt.Container.processEvent(Unknown Source)<br>
    at java.awt.Component.dispatchEventImpl(Unknown Source)<br>
    at java.awt.Container.dispatchEventImpl(Unknown Source)<br>
    at java.awt.Component.dispatchEvent(Unknown Source)<br>
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)<br>
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)<br>
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)<br>
    at java.awt.Container.dispatchEventImpl(Unknown Source)<br>
    at java.awt.Window.dispatchEventImpl(Unknown Source)<br>
    at java.awt.Component.dispatchEvent(Unknown Source)<br>
    at java.awt.EventQueue.dispatchEvent(Unknown Source)<br>
    at com.iver.andami.ui.AndamiEventQueue.dispatchEvent(Unknown Source)<br>
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)<br>
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<br>
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br>
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br>
    at java.awt.EventDispatchThread.run(Unknown Source)<br>
<br>
</div></div></font>
</p>

</div>
<br>_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br></blockquote></div><br>