Does anyone have an example using postGIS that works?  I've tried spearfishPostGIS with geotools 2.0.0, 2.1.0 and 2.0.b5.  I've tried it with PostgresSQL 7.4 and 8.0 with PostGIS 1.0.4.  My basic error seems to be 

org.geotools.data.DataSourceException: SQL Error building FeatureType for roads
    at org.geotools.data.jdbc.JDBCDataStore.buildSchema(JDBCDataStore.java:1022)
    at org.geotools.data.jdbc.JDBCDataStore.getFeatureTypeInfo(JDBCDataStore.java:1190)
    at org.geotools.data.jdbc.JDBCDataStore.getSchema(JDBCDataStore.java:282)
    at org.geotools.data.postgis.PostgisDataStore.getFeatureSource(PostgisDataStore.java:436)
    at org.geotools.demo.gui.PostGISDataStore.<init>(PostGISDataStore.java:34)
    at org.geotools.demo.gui.PostGISDataStore.main(PostGISDataStore.java:44)
Caused by: java.sql.SQLException: ERROR:  column a.oid does not exist

    at org.postgresql.Connection.ExecSQL(Connection.java:533)
    at org.postgresql.Connection.ExecSQL(Connection.java:400)
    at org.postgresql.jdbc2.DatabaseMetaData.getColumns(DatabaseMetaData.java:1894)
    at org.geotools.data.jdbc.JDBCDataStore.buildSchema(JDBCDataStore.java:993)
    ... 5 more

but I can get various other errors depending on what jars I use.  I tried the jars listed in the demo and that didn't work either.  Does PostGIS work with GeoTools?  The oid column is a hidden column in PostgreSQL, it always exists.  I've traced the failure and it appears to be occurring while getting the databaseMetaData.  I've tried to trace this, but it seems to get deep into the guts of the driver.

P.S.  I've also tried the latest PostgreSQL JDBC driver and the one included in the gt2-spearfish demo.  etc etc etc

==================================================
Donald W. Denbo, Ph.D.      [EMAIL PROTECTED]
Ph: (206) 526-4487   Fax: (206) 526-6744

University of Washington
JISAO, Box 367940
Seattle, Washington  98195
==================================================


Reply via email to