You are not logged in.

#1 2017-01-18 09:43:37

hakunamatata
Member
Registered: 2016-03-31
Posts: 36

[SOLVED] Setting up PostgreSQL in a development environment

I need a psql database running for developing a Java Project. On Ubuntu (16.04) I was using postgresql (v9.5) together with pgadmin3. However, the current version of postgresql in the official repos is v9.6. When running my project I am an error similar to this one:

org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist
  Position: 407
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:283)
        at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(AbstractJdbc2DatabaseMetaData.java:4234)
        at org.intermine.task.CreateIndexesTask.execute(CreateIndexesTask.java:212)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

The suggested solution is to downgrade to postgresql v9.5. Since I just switched to Arch, I don't have any previous pkg in my pacman cache that I could downgrade to. So I tried to install a specific version of postgresql from the AUR and now my postgresql installation seems to be messed up. I probably will end up reinstalling Arch and installing postgresql-9.5 from AUR right away.

But anyways I was wondering if anyone is succesfully running postgresql (v9.6) from the official repos?

Last edited by hakunamatata (2017-12-04 13:45:29)

Offline

#2 2017-01-18 09:53:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] Setting up PostgreSQL in a development environment

In the very link you posted, the answer with the most upvotes also mentions that this can also be fixed by updating your JDBC driver, which would be the more sane option IMO

Offline

#3 2017-01-18 10:19:57

hakunamatata
Member
Registered: 2016-03-31
Posts: 36

Re: [SOLVED] Setting up PostgreSQL in a development environment

Thanks for pointing out, will try. Any chance you know the difference between e.g. 9.4.1211 and 9.4-1206-jdbc41 versions? Right now I am using 9.3-1102-jdbc41.

Last edited by hakunamatata (2017-01-18 20:17:26)

Offline

#4 2017-01-18 11:55:30

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] Setting up PostgreSQL in a development environment

https://jdbc.postgresql.org/download.html contains an explanation, those are newer versions of the JDBC API depending on which version of Java you are running/intending to run on.

Offline

#5 2017-01-18 20:16:47

hakunamatata
Member
Registered: 2016-03-31
Posts: 36

Re: [SOLVED] Setting up PostgreSQL in a development environment

Thank you very much, sir. Problem seems to be solved by updating the jdbc driver to version 9.4.1211 in the pom.xml file.

Offline

#6 2017-01-18 20:18:42

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] Setting up PostgreSQL in a development environment

Neat don't forget to mark as [SOLVED] by editing your initial post's title and prepending that to it.

Offline

Board footer

Powered by FluxBB