This is a discussion on Pb with Spring & Metadat within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Hello, I want to get database information using metadata with Spring (1.2.4). It's OK with postGre8.0, but when I ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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.MetaDataAccessExc eption: 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.extract DatabaseMetaData(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.receiveEr rorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:314) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:221) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData .getImportedExportedKeys(AbstractJdbc2DatabaseMeta Data.java:3237) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData .getImportedKeys(AbstractJdbc2DatabaseMetaData.jav a:3533) at arc.bd.spring.callback.ImportedKeyInfo.processMeta Data(ImportedKeyInfo.java:28) at org.springframework.jdbc.support.JdbcUtils.extract DatabaseMetaData(JdbcUtils.java:174) ... 5 more -- Il n'y a pas de mauvais langage, il n'y a que des bons programmeurs ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| 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.MetaDataAccessExc eption: 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(Table Service.java:107) at arc.bd.spring.service.TableService.getTablePg(Tabl eService.java:67) at arc.bd.spring.service.TestTableService.testTableSe rvice(TestTableService.java:15) at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) ... at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196) Caused by: org.springframework.jdbc.support.MetaDataAccessExc eption: 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.extract DatabaseMetaData(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.receiveEr rorResponse(QueryExecutorImpl.java:1471) at org.postgresql.core.v3.QueryExecutorImpl.processRe sults(QueryExecutorImpl.java:1256) at org.postgresql.core.v3.QueryExecutorImpl.execute(Q ueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut e(AbstractJdbc2Statement.java:389) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eWithFlags(AbstractJdbc2Statement.java:314) at org.postgresql.jdbc2.AbstractJdbc2Statement.execut eQuery(AbstractJdbc2Statement.java:221) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData .getImportedExportedKeys(AbstractJdbc2DatabaseMeta Data.java:3237) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData .getImportedKeys(AbstractJdbc2DatabaseMetaData.jav a:3533) at arc.bd.spring.callback.ImportedKeyInfo.processMeta Data(ImportedKeyInfo.java:28) at org.springframework.jdbc.support.JdbcUtils.extract DatabaseMetaData(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 > > > > ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| 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 |
| |||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| 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.getVersio n()); 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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |
| |||
| On Mon, 13 Feb 2006, Markus Schaber wrote: > TNO wrote: >> My Eclipse classpath show me 8.1 driver... > > System.err.println(org.postgresql.Driver.getVersio n()); or better yet, System.err.println(org.postgresql.util.PSQLDriverV ersion.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 |
| |||
| 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.getVersio n()); > > > or better yet, > > System.err.println(org.postgresql.util.PSQLDriverV ersion.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 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| |||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| ||||
| Hi, Kris, Kris Jurka wrote: >> TNO wrote: >> >>> My Eclipse classpath show me 8.1 driver... >> >> >> System.err.println(org.postgresql.Driver.getVersio n()); > > > or better yet, > > System.err.println(org.postgresql.util.PSQLDriverV ersion.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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings |