[postgis-users] PostGIS and Java
David Potts
dave.potts at pinan.co.uk
Tue Mar 4 00:26:35 PST 2008
whats the nature of the error message ?
Do you get messages about not being able to find the class when your
building your application or some type of error when you run your
application?
>From what you have said so far I would suspect a class issue problem, ie
the jar file that includes the correct postgres deriver is not on your
classpath.
There is one jar file that includes all the class files that are required
to access a postgres database. There another jar file include with the
postgis download, it includes all the addional classes required to access
the postgis data types. It must be include in your class path as well as
thenormal postgres java driver class.
D.
> Hello,
>
> 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).
>
> At the moment, the only workaround I found is using the basic JDBC
> connection without modification and then I do
> PGgeometry pgGeometry = new PGgeometry( (String)
> resultSet.getObject("geom") );
>
> Is it the right way to read the geo data?
>
> Thanks for your help,
> Gerald
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of the
Pinan Software
More information about the postgis-users
mailing list