[postgis-users] PostGIS and Java

Colin Wetherbee cww at denterprises.org
Tue Mar 4 11:04:22 PST 2008


� wrote:
> I am using PostGIS 1.3.2 with PostgreSQL 8.2 and Java 6 and Debian
> Linux Testing.
> 
> The Java/JDBC examples provided in chapter 4.8 of documentation don't work.
> http://postgis.refractions.net/docs/ch04.html#id2911266
> 
> I can't find the org.postgresql.Connection class, does it still exist?
> If I use the org.postgresql.PGConnection instead, addDataType methods
> are deprecated and do nothing (the resultSet.getObject("geom") returns
> a String instead of PGgeometry).

It sounds like you're probably missing a package.  Which related 
packages are installed now?

I don't do PostGIS/Java development, but I'd guess you'd want to install 
the following packages for it.

^ cww at iron.dev:~$ apt-cache search postgis | grep -i postgresql
libpostgis-java - geographic objects support for PostgreSQL -- JDBC support
postgis - geographic objects support for PostgreSQL -- common files
postgresql-8.2-postgis - geographic objects support for PostgreSQL 8.2

In particular, note libpostgis-java, which contains:

^ cww at iron.dev:~$ apt-file list libpostgis-java
libpostgis-java: usr/share/doc/libpostgis-java/changelog.Debian.gz
libpostgis-java: usr/share/doc/libpostgis-java/changelog.gz
libpostgis-java: usr/share/doc/libpostgis-java/copyright
libpostgis-java: usr/share/java/postgis.jar
libpostgis-java: usr/share/java/postgis_debug.jar

Colin



More information about the postgis-users mailing list