[postgis-users] JDBC2 Question

Eli Dylan Lorimer e.d.lorimer at sms.ed.ac.uk
Fri Apr 15 10:03:36 PDT 2005


Hi,
I've successfully installed PostgreSQL and I belive PostGIS. The  
postgis jar file is in my classpath, as is the postgresql. I am capable  
of querying a standard table via jdbc. What I cannot seem to do though  
is use the PostGIS JDBC extension objects so that I can directly access  
the spatial geometry. Specifically, the bit in the supplied code here:

((org.postgresql.Connection)conn).addDataType("geometry","org.postgis.PG 
geometry");
((org.postgresql.Connection)conn).addDataType("box3d","org.postgis.PGbox 
3d");

  isn't resolving. I'm getting this error:
org.postgresql.Connection cannot be resolved or isn't a type.

My imports are as follows:
import org.postgis.*;
import org.postgresql.*;

Any ideas?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 794 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050415/c16180a0/attachment.bin>


More information about the postgis-users mailing list