<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Gvsig_english] gvSIG 1.1.2: Cannot load PostGIS-Layer</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<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 '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.<BR>
<BR>
Regards,<BR>
<BR>
Juan Lucas Domínguez Rubio<BR>
---<BR>
Prodevelop SL, Valencia (España)<BR>
0° 22' 49.62&quot; W, 39° 28' 25.45&quot; N<BR>
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68<BR>
<A HREF="http://www.prodevelop.es">http://www.prodevelop.es</A><BR>
---<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: gvsig_internacional-bounces@listserv.gva.es on behalf of Johannes Valenta<BR>
Sent: Sat 18/07/2009 16:36<BR>
To: Gvsig_internacional@listserv.gva.es<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, 'XDR'), 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&nbsp; 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>
&nbsp;&nbsp;&nbsp; at<BR>
com.iver.cit.gvsig.fmap.drivers.jdbc.postgis.PostGisDriver.setData(Unknown<BR>
Source)<BR>
&nbsp;&nbsp;&nbsp; at<BR>
com.prodevelop.cit.gvsig.vectorialdb.wizard.WizardVectorialDB.getLayer(Unknown<BR>
Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.cit.gvsig.AddLayer.loadGenericWizardPanelLayers(Unknown<BR>
Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.cit.gvsig.AddLayer.addLayers(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.cit.gvsig.AddLayer.execute(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.andami.plugins.ExtensionDecorator.execute(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.andami.ui.mdiFrame.MDIFrame.actionPerformed(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.DefaultButtonModel.setPressed(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown<BR>
Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Component.processMouseEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at javax.swing.JComponent.processMouseEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Component.processEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Container.processEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Component.dispatchEventImpl(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Container.dispatchEventImpl(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Component.dispatchEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Container.dispatchEventImpl(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Window.dispatchEventImpl(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.Component.dispatchEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventQueue.dispatchEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at com.iver.andami.ui.AndamiEventQueue.dispatchEvent(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<BR>
&nbsp;&nbsp;&nbsp; at java.awt.EventDispatchThread.run(Unknown Source)<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>