[postgis-users] compatibilité JDBC Postgis PostgreSQL

Dominique Legendre d.legendre at brgm.fr
Thu Feb 24 00:32:51 PST 2005


Hi all.

i am trying  to write a Java/JDBC program for inserting new geometry in
a table.
I use postgis 1.0.0rc2 on PostreSQL 8.0.1 and my java program use 1.4.2

My program works correcty the pg74.215.jdbc3 version of the posgres JDBC
driver but fails with the postgresql-8.0.309.jdbc3 version.
this is the error message:
java.lang.NoSuchMethodError:
org.postgresql.core.BaseConnection.getEncoding()Lorg/postgresql/core/Encoding;

 at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1880)

 at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getFixedString(AbstractJdbc2ResultSet.java:2385)

 at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1984)

 at
org.postgresql.jdbc2.AbstractJdbc2Connection.getPGType(AbstractJdbc2Connection.java:951)

 at
org.postgresql.jdbc2.AbstractJdbc2Statement.setPGobject(AbstractJdbc2Statement.java:1463)

 at
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1652)

I am trying to change the addDataType from "org.postgis.PGgeometry" to
org.postgis.PGgeometry.class with no change.

Could somebody explain me the differences between the postgeSQL JDBC
version and the compatibilities with the postgisxxx.jar

Many, many thanks

Dominique Legendre


Pensez à visiter le site BRGM sur.... http://www.brgm.fr/

***
Le contenu de cet e-mail et de ses pièces jointes est destiné à l'usage exclusif du 
(des) destinataire(s) expressément désigné(s) comme tel(s). En cas de réception de cet 
 e-mail par erreur, le signaler à son expéditeur et ne pas en divulguer le contenu. 
L'absence de virus a été vérifié à  l'émission du message. Il convient néanmoins de 
vérifier l'absence de corruption à sa réception.

The contents of this email and any attachments are confidential. They are intended for 
the named recipient(s) only. If you have received this email in error please notify the 
system manager or  the sender immediately and do not disclose the contents to 
anyone or make copies. eSafe scanned this email for viruses, vandals and malicious 
content.
***



More information about the postgis-users mailing list