Opened 8 years ago
Closed 8 years ago
#2073 closed defect (fixed)
Update JDBC driver for PostgreSQL
Reported by: | Nicklas Nordborg | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | critical | Milestone: | BASE 3.11 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
It seems like PostgreSQL 9.6 causes an issue when running the updatedb.sh script:
org.hibernate.exception.SQLGrammarException: Error accessing index information: public.`AnnotationTypeCategories` at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:99) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:609) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.indexes(TableInformationImpl.java:110) at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getIndex(TableInformationImpl.java:121) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.findMatchingIndex(SchemaMigratorImpl.java:292) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyIndexes(SchemaMigratorImpl.java:277) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:184) at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) at net.sf.basedb.core.hibernate.SchemaGenerator.execute(SchemaGenerator.java:133) at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:37) at org.hibernate.internal.SessionImpl$3.accept(SessionImpl.java:2134) at org.hibernate.internal.SessionImpl$3.accept(SessionImpl.java:2131) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:332) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2153) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2138) at net.sf.basedb.core.HibernateUtil.createStaticTables(HibernateUtil.java:767) at net.sf.basedb.core.Install.createTables(Install.java:138) at net.sf.basedb.install.InitDB.main(InitDB.java:75) Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist Position: 427 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:286) at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getIndexInfo(AbstractJdbc2DatabaseMetaData.java:4234) at com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.getIndexInfo(NewProxyDatabaseMetaData.java:3352) at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:567) ... 16 more
Updating to a newer JDBC driver seems to fix the problem. See also http://stackoverflow.com/questions/38427585/postgresql-error-column-am-amcanorder-doesnt-exist
Change History (4)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
comment:3 by , 8 years ago
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The migration seems to work.
Note:
See TracTickets
for help on using tickets.
(In [7327]) References #2073: Update JDBC driver for PostgreSQL
The new JAR file is in place. Had to change some code in the Migration class but it has not yet been tested. The regular initdb.sh and updatedb.sh seems to work.