Pb with Spring & Metadat

Lists: pgsql-jdbc
From: TNO <tnodev(at)free(dot)fr>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Pb with Spring & Metadat
Date: 2006-02-09 17:36:09
Message-ID: 43EB7D89.4050406@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hello,

I want to get database information using metadata with Spring (1.2.4).
It's OK with postGre8.0, but when I use postGre8.1, error...

what about this function "information_schema._pg_keypositions()" ?

Caused by: org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData; nested exception is
org.postgresql.util.PSQLException: ERROR: function
information_schema._pg_keypositions() does not exist
at
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:180)

at
arc.bd.spring.service.TableService.fillRelation1_1(TableService.java:181)
... 4 more
Caused by: org.postgresql.util.PSQLException: ERROR: function
information_schema._pg_keypositions() does not exist
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)

at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)

at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)

at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)

at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)

at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221)

at
org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedExportedKeys(AbstractJdbc2DatabaseMetaData.java:3237)

at
org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedKeys(AbstractJdbc2DatabaseMetaData.java:3533)

at
arc.bd.spring.callback.ImportedKeyInfo.processMetaData(ImportedKeyInfo.java:28)

at
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:174)

... 5 more

--
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs


From: Kris Jurka <books(at)ejurka(dot)com>
To: TNO <tnodev(at)free(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-09 18:31:26
Message-ID: Pine.BSO.4.61.0602091330410.27328@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Thu, 9 Feb 2006, TNO wrote:

> Hello,
>
> I want to get database information using metadata with Spring (1.2.4).
> It's OK with postGre8.0, but when I use postGre8.1, error...
>
> what about this function "information_schema._pg_keypositions()" ?
>
> org.postgresql.util.PSQLException: ERROR: function
> information_schema._pg_keypositions() does not exist
> at

If you're going to use a 8.1 server you need the 8.1 driver as well.

Kris Jurka


From: tnodev <tnodev(at)free(dot)fr>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-10 07:35:22
Message-ID: 43EC423A.1050101@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

I have both postgre8.0 and 8.1 on my station.
8.0 on port 5432 and 8.1 on port 54321

when I use pg8.0 and driver postgresql-8.0-315.jdbc3.jar, works fine...
when I use pg8.1 and driver postgresql-8.1-404.jdbc3.jar error !

here's the full trace

arc.bd.service.exception.ArcException:
org.springframework.jdbc.support.MetaDataAccessException: Error while
extracting DatabaseMetaData; nested exception is
org.postgresql.util.PSQLException: ERROR: function
information_schema._pg_keypositions() does not exist
at
arc.bd.spring.service.TableService.fillRelation1_1(TableService.java:194)
at arc.bd.spring.service.TableService.fillTable(TableService.java:107)
at arc.bd.spring.service.TableService.getTablePg(TableService.java:67)
at
arc.bd.spring.service.TestTableService.testTableService(TestTableService.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.jdbc.support.MetaDataAccessException:
Error while extracting DatabaseMetaData; nested exception is
org.postgresql.util.PSQLException: ERROR: function
information_schema._pg_keypositions() does not exist
at
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:180)
at
arc.bd.spring.service.TableService.fillRelation1_1(TableService.java:181)
... 18 more
Caused by: org.postgresql.util.PSQLException: ERROR: function
information_schema._pg_keypositions() does not exist
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
at
org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:221)
at
org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedExportedKeys(AbstractJdbc2DatabaseMetaData.java:3237)
at
org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getImportedKeys(AbstractJdbc2DatabaseMetaData.java:3533)
at
arc.bd.spring.callback.ImportedKeyInfo.processMetaData(ImportedKeyInfo.java:28)
at
org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:174)
... 19 more

Kris Jurka a écrit :

>
>
> On Thu, 9 Feb 2006, TNO wrote:
>
>> Hello,
>>
>> I want to get database information using metadata with Spring (1.2.4).
>> It's OK with postGre8.0, but when I use postGre8.1, error...
>>
>> what about this function "information_schema._pg_keypositions()" ?
>>
>> org.postgresql.util.PSQLException: ERROR: function
>> information_schema._pg_keypositions() does not exist
>> at
>
>
> If you're going to use a 8.1 server you need the 8.1 driver as well.
>
> Kris Jurka
>
>
>
>


From: Kris Jurka <books(at)ejurka(dot)com>
To: tnodev <tnodev(at)free(dot)fr>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-10 07:43:53
Message-ID: Pine.BSO.4.61.0602100239120.367@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Fri, 10 Feb 2006, tnodev wrote:

> I have both postgre8.0 and 8.1 on my station.
> 8.0 on port 5432 and 8.1 on port 54321
>
> when I use pg8.0 and driver postgresql-8.0-315.jdbc3.jar, works fine...
> when I use pg8.1 and driver postgresql-8.1-404.jdbc3.jar error !
>

You are mistaken about what version of the driver you are using with 8.1.
The stacktrace confirms that you are using an 8.0 driver.

Kris Jurka


From: TNO <tnodev(at)free(dot)fr>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 10:53:26
Message-ID: 43F06526.5050406@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

My Eclipse classpath show me 8.1 driver...

Kris Jurka a écrit :

>
>
> On Fri, 10 Feb 2006, tnodev wrote:
>
>> I have both postgre8.0 and 8.1 on my station.
>> 8.0 on port 5432 and 8.1 on port 54321
>>
>> when I use pg8.0 and driver postgresql-8.0-315.jdbc3.jar, works fine...
>> when I use pg8.1 and driver postgresql-8.1-404.jdbc3.jar error !
>>
>
> You are mistaken about what version of the driver you are using with
> 8.1. The stacktrace confirms that you are using an 8.0 driver.
>
> Kris Jurka
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
>

--
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs


From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: TNO <tnodev(at)free(dot)fr>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 11:42:58
Message-ID: 43F070C2.4090505@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi, TNO,

TNO wrote:
> My Eclipse classpath show me 8.1 driver...

Are you shure that you don't have the 8.0 driver deployed into the jdk
ext directory, or somewhere else where it is found by the jdk?

Can you place
System.err.println(org.postgresql.Driver.getVersion());
into your application to see which driver version it loads?

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


From: Kris Jurka <books(at)ejurka(dot)com>
To: Markus Schaber <schabi(at)logix-tt(dot)com>
Cc: TNO <tnodev(at)free(dot)fr>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 14:46:58
Message-ID: Pine.BSO.4.63.0602130945250.23516@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Mon, 13 Feb 2006, Markus Schaber wrote:

> TNO wrote:
>> My Eclipse classpath show me 8.1 driver...
>
> System.err.println(org.postgresql.Driver.getVersion());

or better yet,

System.err.println(org.postgresql.util.PSQLDriverVersion.main());

This will print out where it has found the driver as well as what version
it has found.

Kris Jurka


From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 14:53:45
Message-ID: 43F09D79.9010500@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi, Kris,

Kris Jurka wrote:

>> TNO wrote:
>>
>>> My Eclipse classpath show me 8.1 driver...
>>
>>
>> System.err.println(org.postgresql.Driver.getVersion());
>
>
> or better yet,
>
> System.err.println(org.postgresql.util.PSQLDriverVersion.main());
>
> This will print out where it has found the driver as well as what
> version it has found.

Oh, great tool. However, it does not work this way. You have to call
org.postgresql.util.PSQLDriverVersion.main(args)
with args being a String array, and don't wrap it into
System.err.println, as it returns void.

HTH,
Markus

--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


From: TNO <tnodev(at)free(dot)fr>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 15:56:58
Message-ID: 43F0AC4A.7080607@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Seems good... ;-)

PostgreSQL 8.1devel JDBC3 with SSL (build 400)
Found in:
jar:file:/C:/eclipse3.1/Java/Jar/postgresql-8.1dev-400.jdbc3.jar!/org/postgresql/Driver.class

Kris Jurka a écrit :

>
>
> On Mon, 13 Feb 2006, Markus Schaber wrote:
>
>> TNO wrote:
>>
>>> My Eclipse classpath show me 8.1 driver...
>>
>>
>> System.err.println(org.postgresql.Driver.getVersion());
>
>
> or better yet,
>
> System.err.println(org.postgresql.util.PSQLDriverVersion.main());
>
> This will print out where it has found the driver as well as what
> version it has found.
>
> Kris Jurka
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>
>

--
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs


From: Markus Schaber <schabi(at)logix-tt(dot)com>
To: TNO <tnodev(at)free(dot)fr>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 16:07:18
Message-ID: 43F0AEB6.6070509@logix-tt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hi, TNO,

TNO wrote:
> Seems good... ;-)
>
> PostgreSQL 8.1devel JDBC3 with SSL (build 400)
> Found in:
> jar:file:/C:/eclipse3.1/Java/Jar/postgresql-8.1dev-400.jdbc3.jar!/org/postgresql/Driver.class

Doesn't seem so good, as you're using a prerelease version.

Try to get 8.1 build 405 from http://jdbc.postgresql.org/download.html
and see if the problem persists.

HTH,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


From: Kris Jurka <books(at)ejurka(dot)com>
To: TNO <tnodev(at)free(dot)fr>
Cc: Markus Schaber <schabi(at)logix-tt(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-13 16:44:09
Message-ID: Pine.BSO.4.63.0602131142470.962@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Mon, 13 Feb 2006, TNO wrote:

> Seems good... ;-)
>
> PostgreSQL 8.1devel JDBC3 with SSL (build 400)
> Found in:
>

Earlier you claimed to have build 404, but you've only got 400. This
problem was fixed in build 401. Please upgrade.

Kris Jurka


From: TNO <tnodev(at)free(dot)fr>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pb with Spring & Metadat
Date: 2006-02-15 15:34:48
Message-ID: 43F34A18.9070508@free.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Works fine , thanks a lot

PostgreSQL 8.1 JDBC3 with SSL (build 404)
Found in:
jar:file:/C:/eclipse3.1/Java/Jar/postgresql-8.1-404.jdbc3.jar!/org/postgresql/Driver.class

Markus Schaber a écrit :

>Hi, TNO,
>
>TNO wrote:
>
>
>>Seems good... ;-)
>>
>>PostgreSQL 8.1devel JDBC3 with SSL (build 400)
>>Found in:
>>jar:file:/C:/eclipse3.1/Java/Jar/postgresql-8.1dev-400.jdbc3.jar!/org/postgresql/Driver.class
>>
>>
>
>Doesn't seem so good, as you're using a prerelease version.
>
>Try to get 8.1 build 405 from http://jdbc.postgresql.org/download.html
>and see if the problem persists.
>
>HTH,
>Markus
>
>

--
Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs