Hi all,
I am trying to connect geoserver with PostGIS version 1.3.2.4 and PostgreSQL 8.3.1.1, but when I try to create the data source through the user interface I get a "Connection parameters are invalid" error. In the console however this is the error stack I see:
------------
Could not acquire PostGIS spatial database:java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
at org.geotools.data.postgis.PostgisDBInfo.<init>(PostgisDBInfo.java:83)
at org.geotools.data.postgis.PostgisDataStore.getDBInfo(PostgisDataStore.java:1984)
at org.geotools.data.postgis.PostgisDataStore.guessDataStoreOptions(PostgisDataStore.java:324)
at org.geotools.data.postgis.PostgisDataStore.<init>(PostgisDataStore.java:290)
at org.geotools.data.postgis.PostgisDataStore.<init>(PostgisDataStore.java:265)
at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStoreInternal(PostgisDataStoreFactory.java:230)
at org.geotools.data.postgis.PostgisDataStoreFactory.createDataStore(PostgisDataStoreFactory.java:195)
at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:91)
at org.vfny.geoserver.util.DataStoreUtils.getDataStore(DataStoreUtils.java:62)
at org.vfny.geoserver.util.DataStoreUtils.acquireDataStore(DataStoreUtils.java:51)
at org.vfny.geoserver.action.data.DataDataStoresEditorAction.execute(DataDataStoresEditorAction.java:134)
......
-------------
If I intentionally write wrong the connection parameters, like writing an incorrect db name, i get normal connection errors in the console.
So somehow it seems that the jdbc library does not manage to get some metadata about this postgreSQL when connecting.
Any idea of what could be going wrong?
Thanks in advance.
Javier.
Javier de la Torre ha scritto:
Hi all,
I am trying to connect geoserver with PostGIS version 1.3.2.4 and PostgreSQL 8.3.1.1, but when I try to create the data source through the user interface I get a "Connection parameters are invalid" error. In the console however this is the error stack I see:
------------
Could not acquire PostGIS spatial database:java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
at org.geotools.data.postgis.PostgisDBInfo.<init>(PostgisDBInfo.java: 83)
Ouch, it seems GeoServer is not using the Postgres jdbc driver we're
shipping with, but possibly an older version?
Did you deploy GeoServer in a container where the jdbc drivers have
been put in some server wide shared library folder (like tomcat/shared/lib)?
Cheers
Andrea
Hi Andrea,
I just downloaded the latest geoserver and i am using the embeded jetty server.
So I suppose it is using the library you bundle.
Cheers.
On 31/03/2008, at 11:04, Andrea Aime wrote:
Javier de la Torre ha scritto:
Hi all,
I am trying to connect geoserver with PostGIS version 1.3.2.4 and PostgreSQL 8.3.1.1, but when I try to create the data source through the user interface I get a "Connection parameters are invalid" error. In the console however this is the error stack I see:
------------
Could not acquire PostGIS spatial database:java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
at org.geotools.data.postgis.PostgisDBInfo.<init>(PostgisDBInfo.java: 83)
Ouch, it seems GeoServer is not using the Postgres jdbc driver we're
shipping with, but possibly an older version?
Did you deploy GeoServer in a container where the jdbc drivers have
been put in some server wide shared library folder (like tomcat/shared/lib)?
Cheers
Andrea
Hi,
I still dont manage to use postgis.
To make it clear. I am using:
-Geoserver 1.6.2a
-Mac OS X Leopard with java 1.5.0_13
-Using the embedded jetty engine
-PostgreSQL 8.3.1
-Postgis 1.2.3.4
I have tried downloading the latest JDBC drivers but still no luck. I searched for the problem and found a message that I am not sure if it applicable here, but I dont have the source code installed for building and testing:
http://mail-archive.objectweb.org/c-jdbc/2005-04/msg00083.html
It talks about problems with drivers compiled with older JDKs (1.3) and running them in new ones (1.4,1.5). There they suggest catching this error.
Cheers.
Javier.
On 31/03/2008, at 11:04, Andrea Aime wrote:
Javier de la Torre ha scritto:
Hi all,
I am trying to connect geoserver with PostGIS version 1.3.2.4 and PostgreSQL 8.3.1.1, but when I try to create the data source through the user interface I get a "Connection parameters are invalid" error. In the console however this is the error stack I see:
------------
Could not acquire PostGIS spatial database:java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
java.lang.AbstractMethodError: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.getDatabaseMajorVersion()I
at org.geotools.data.postgis.PostgisDBInfo.<init>(PostgisDBInfo.java: 83)
Ouch, it seems GeoServer is not using the Postgres jdbc driver we're
shipping with, but possibly an older version?
Did you deploy GeoServer in a container where the jdbc drivers have
been put in some server wide shared library folder (like tomcat/shared/lib)?
Cheers
Andrea