Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL Error: column am.amcanorder doesn't exist

Tags:

postgresql

ant

I am working on CentOS release 6.8 (Final) based server without sudo access. I compiled PostgreSQL v9.6 beta 2.

When I am loading data using ant, I get am.amcanorder column doesn't exist error which I don't know how to fix.

I am following a tutorial to set up Intermine data warehousing system and I am on this step.


 ant -Dsource=uniprot-malaria -v 

This will take a couple of minutes to complete, the command runs the following steps:

  • Checks that a source with name uniprot-malaria exists in project.xml
  • Reads the UniProt XML files at the location specified by src.data.dir
  • Calls the parser included in the uniprot source with the list of files, this reads the original XML and creates Items which are metadata representations of the objects that will be loaded into the malariamine database.
  • These items are stored in an intermediate items database. Reads from the items database, converts items to objects and loads them into the malariamine database.

The bold part is what (in my opinion) causing the error. The relevant error verbose is:

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) 
like image 403
player87 Avatar asked Jul 18 '16 01:07

player87


2 Answers

Player87 is right, it works just by replacing the newer version 9.6* with 9.5.* of the PostgresSQL server.
But, there is another solution. For a Java project, I have also tried leaving PostgresSQL server on 9.6.* and updated the PostgresSQL driver, from version 9.4-1203 to the newest one 9.4-1211. In a maven pom.xml file:

<postgresql.version>9.4.1211</postgresql.version> 

That worked for me too.

like image 143
ancab Avatar answered Sep 23 '22 16:09

ancab


Well the problem was fixed by compiling v9.5.3, the latest stable version at this time. Previously, I was using v9.6beta2 ... which has a reported error when working with JDBC & v9.6beta2.

like image 42
player87 Avatar answered Sep 21 '22 16:09

player87