id summary reporter owner description type status priority milestone component version resolution keywords cc 2044 Upgrading from BASE 3.7 to 3.8 fails Nicklas Nordborg everyone "Stack trace: {{{ [79%] --Updating schema version: 131 -> 132... 15:28:50,009 ERROR Update:1800 - updateToSchemaVersion132: FAILED org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) 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.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) at org.hibernate.engine.query.spi.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:194) at org.hibernate.internal.SessionImpl.executeNativeUpdate(SessionImpl.java:1373) at org.hibernate.internal.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:373) at net.sf.basedb.core.Update.updateToSchemaVersion132(Update.java:1784) at net.sf.basedb.core.Update.updateDatabase(Update.java:529) at net.sf.basedb.install.InitDB.main(InitDB.java:86) Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table ""Annotations"" violates foreign key constraint ""fk_r5upiflba3g19y4efwjic9kkm"" on table ""Annotations"" Detail: Key (id)=(38555) is still referenced from table ""Annotations"". 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:420) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:366) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:461) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ... 6 more }}} The schema update from 131->132 is related to #1992. The foreign key constraint violation is due to an inherited annotation that is referencing an annotation with empty values. The most likely solution to the problem is that the inherited annotation also should be removed. It is not clear how this situation has appeared. The issue described in #1992 was first discovered during the implementation of http://baseplugins.thep.lu.se/ticket/525. Obviously there have been other cases in the past that has led to empty annotations being created. If that happened before #1941 (BASE 3.6) the inherited annotation could have been created due to changes made in [6910] and [6917] (which transformed inherited annotation sets to inherited annotations). " defect closed critical BASE 3.9.2 install fixed