Hi
In 1.6 Beta 4 (.war file deployed in JBoss 4.0.5) i try to create a postgis datastore I am getting a “org.geotools.data.DataSourceException: Connection test failed” this is cause by the class org.postgis.PGbox2d not implementing org.postgresql.util.PGobject.
I do not know why i get this error because on my machine I have no problems, but VMWare linux install the problem occurs. Has anybody else experienced this problem ? I can confirm that postgis is installed and working as i already have put spatial data into the database via a JDBC connection without any problems.
Any help is greatly appreciated.
Andy
Andy Dale ha scritto:
Hi
In 1.6 Beta 4 (.war file deployed in JBoss 4.0.5) i try to create a postgis datastore I am getting a "org.geotools.data.DataSourceException: Connection test failed" this is cause by the class org.postgis.PGbox2d not implementing org.postgresql.util.PGobject.
I do not know why i get this error because on my machine I have no problems, but VMWare linux install the problem occurs. Has anybody else experienced this problem ? I can confirm that postgis is installed and working as i already have put spatial data into the database via a JDBC connection without any problems.
I think you have problems with the classpath there. It seems GeoServer is finding in its classpath a mismatched version of the postgres jdbc
driver. We do ship with the 8.1-407.jdbc3 version of the driver,
my guess is that someone has placed a different version of the driver
in the web container shared libs (if it's tomcat, look in tomcat/shared/lib), or in the jre lib/ext directory.
The safest path is to remove them and have geoserver use the jdbc
driver it was tested with. As an alternative, you can keep the shared
one and remove the one shipped with geoserver (it's in geoserver/WEB-INF/lib) and cross fingers hoping everything works fine
(it should, but no-one has ever tested the latest drivers).
Cheers
Andrea
Hi,
Thanks for the quick response Andrea, after reading the response I have looked into what could possibly cause it to work on my machine and not on the other. I have discovered that the difference is that i have the postgres jdbc driver in /lib/ext and the machine that failed does not.
Placing the JDBC driver there solves the problem.
Thanks,
Andy
On 04/12/2007, Andrea Aime < aaime@anonymised.com> wrote:
Andy Dale ha scritto:
Hi
In 1.6 Beta 4 (.war file deployed in JBoss 4.0.5) i try to create a
postgis datastore I am getting a “org.geotools.data.DataSourceException:
Connection test failed” this is cause by the class org.postgis.PGbox2d
not implementing org.postgresql.util.PGobject.
I do not know why i get this error because on my machine I have no
problems, but VMWare linux install the problem occurs. Has anybody else
experienced this problem ? I can confirm that postgis is installed and
working as i already have put spatial data into the database via a JDBC
connection without any problems.
I think you have problems with the classpath there. It seems GeoServer
is finding in its classpath a mismatched version of the postgres jdbc
driver. We do ship with the 8.1-407.jdbc3 version of the driver,
my guess is that someone has placed a different version of the driver
in the web container shared libs (if it’s tomcat, look in
tomcat/shared/lib), or in the jre lib/ext directory.
The safest path is to remove them and have geoserver use the jdbc
driver it was tested with. As an alternative, you can keep the shared
one and remove the one shipped with geoserver (it’s in
geoserver/WEB-INF/lib) and cross fingers hoping everything works fine
(it should, but no-one has ever tested the latest drivers).
Cheers
Andrea