Dear DSpace-CRIS experts, I am in the process of migrating my local DSpace 5x (DSpace 5.8) to DSpace-CRIS 5.8.0. I have followed the steps as instructed here: Upgrade an existent DSpace (not CRIS) installation <https://wiki.duraspace.org/display/DSPACECRIS/Installation#Installation-UpgradeanexistentDSpace(notCRIS)installation>. However, I am encountering errors when I execute dspace database repair and dspace database migrate ignored even though I have manually applied the 3 sql as stated here: http://dspace.2283337.n4.nabble.com/DSpace-CRIS-Database-Update-Failure-tp4682902p4682917.html .
Below is the error log after I ran dspace database repair: 2017-11-28 18:33:33,365 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL getDataSource Error - java.sql.SQLException: Flyway migration error occurred at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:493) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:400) at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1473) at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:724) at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:703) at org.dspace.core.Context.init(Context.java:155) at org.dspace.core.Context.<init>(Context.java:129) at org.dspace.storage.rdbms.DatabaseLegacyReindexer.reindex(DatabaseLegacyReindexer.java:52) at org.dspace.storage.rdbms.DatabaseLegacyReindexer.afterRepair(DatabaseLegacyReindexer.java:144) at org.flywaydb.core.internal.command.DbRepair$3.doInTransaction(DbRepair.java:114) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72) at org.flywaydb.core.internal.command.DbRepair.repair(DbRepair.java:111) at org.flywaydb.core.Flyway$6.execute(Flyway.java:994) at org.flywaydb.core.Flyway$6.execute(Flyway.java:990) at org.flywaydb.core.Flyway.execute(Flyway.java:1171) at org.flywaydb.core.Flyway.repair(Flyway.java:990) at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:226) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration on the classpath has not been applied to database: 1.8.2.0 at org.flywaydb.core.Flyway.doValidate(Flyway.java:912) at org.flywaydb.core.Flyway.access$400(Flyway.java:50) at org.flywaydb.core.Flyway$1.execute(Flyway.java:817) at org.flywaydb.core.Flyway$1.execute(Flyway.java:811) at org.flywaydb.core.Flyway.execute(Flyway.java:1171) at org.flywaydb.core.Flyway.migrate(Flyway.java:811) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:481) ... 22 more 2017-11-28 18:33:33,365 ERROR org.dspace.storage.rdbms.DatabaseLegacyReindexer @ Error attempting to reindex all contents for search/browse. You may need to manually reindex Lucene or DBMS java.lang.IllegalStateException: Flyway migration error occurred at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:729) at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:703) at org.dspace.core.Context.init(Context.java:155) at org.dspace.core.Context.<init>(Context.java:129) at org.dspace.storage.rdbms.DatabaseLegacyReindexer.reindex(DatabaseLegacyReindexer.java:52) at org.dspace.storage.rdbms.DatabaseLegacyReindexer.afterRepair(DatabaseLegacyReindexer.java:144) at org.flywaydb.core.internal.command.DbRepair$3.doInTransaction(DbRepair.java:114) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72) at org.flywaydb.core.internal.command.DbRepair.repair(DbRepair.java:111) at org.flywaydb.core.Flyway$6.execute(Flyway.java:994) at org.flywaydb.core.Flyway$6.execute(Flyway.java:990) at org.flywaydb.core.Flyway.execute(Flyway.java:1171) at org.flywaydb.core.Flyway.repair(Flyway.java:990) at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:226) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.sql.SQLException: Flyway migration error occurred at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:493) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:400) at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1473) at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:724) ... 19 more Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration on the classpath has not been applied to database: 1.8.2.0 at org.flywaydb.core.Flyway.doValidate(Flyway.java:912) at org.flywaydb.core.Flyway.access$400(Flyway.java:50) at org.flywaydb.core.Flyway$1.execute(Flyway.java:817) at org.flywaydb.core.Flyway$1.execute(Flyway.java:811) at org.flywaydb.core.Flyway.execute(Flyway.java:1171) at org.flywaydb.core.Flyway.migrate(Flyway.java:811) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:481) ... 22 more And then when I ran dspace database migrate ignored command, below is the output (not in the log file but returned from the command line): c:\dspace-cris\bin>dspace database migrate ignored Using DSpace installation in: c:\dspace-cris Database URL: jdbc:postgresql://localhost:5432/dspace-cris Migrating database to latest version AND running previously "Ignored" migrations ... (Check logs for details) Caught exception: java.sql.SQLException: Flyway migration error occurred at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j ava:493) at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:193) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.j ava:226) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Error executing statement at line 9: create table cris_do (id int4 not null, crisID va rchar(255) unique, sourceID varchar(255) unique, status bool, uuid varchar(255) not null unique, timestampCreated timestamp, timestampLastModified timestamp, ty po_id int4, primary key (id)) at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java :91) at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute( SqlMigrationExecutor.java:73) at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigr ate.java:287) at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigr ate.java:285) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(Tran sactionTemplate.java:72) at org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate .java:285) at org.flywaydb.core.internal.command.DbMigrate.access$800(DbMigrate.jav a:46) at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigr ate.java:207) at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigr ate.java:156) at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(Tran sactionTemplate.java:72) at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:1 56) at org.flywaydb.core.Flyway$1.execute(Flyway.java:864) at org.flywaydb.core.Flyway$1.execute(Flyway.java:811) at org.flywaydb.core.Flyway.execute(Flyway.java:1171) at org.flywaydb.core.Flyway.migrate(Flyway.java:811) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j ava:481) ... 7 more Caused by: org.postgresql.util.PSQLException: ERROR: relation "cris_do" already exists at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx ecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor Impl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja va:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat ement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abstract Jdbc2Statement.java:374) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat ement.java:366) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme nt.java:264) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme nt.java:264) at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStateme nt.java:264) at org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(Jd bcTemplate.java:235) at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java :89) ... 22 more Below is the output of dspace database info command: c:\dspace-cris\bin>dspace database info Using DSpace installation in: c:\dspace-cris Database URL: jdbc:postgresql://localhost:5432/dspace-cris Database Schema: public Database Software: PostgreSQL version 9.5.5 Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901) +----------------+----------------------------+---------------------+---------+ | Version | Description | Installed on | State | +----------------+----------------------------+---------------------+---------+ | 1 | << Flyway Init >> | 2017-11-28 08:31:21 | Success | | 1.1 | Initial DSpace 1.1 databas | 2017-11-28 08:31:21 | Success | | 1.2 | Upgrade to DSpace 1.2 sche | 2017-11-28 08:31:25 | Success | | 1.3 | Upgrade to DSpace 1.3 sche | 2017-11-28 08:31:25 | Success | | 1.3.9 | Drop constraint for DSpace | 2017-11-28 08:31:26 | Success | | 1.4 | Upgrade to DSpace 1.4 sche | 2017-11-28 08:31:26 | Success | | 1.5 | Upgrade to DSpace 1.5 sche | 2017-11-28 08:31:27 | Success | | 1.5.9 | Drop constraint for DSpace | 2017-11-28 08:31:29 | Success | | 1.6 | Upgrade to DSpace 1.6 sche | 2017-11-28 08:31:29 | Success | | 1.7 | Upgrade to DSpace 1.7 sche | 2017-11-28 08:31:29 | Success | | 1.8 | Upgrade to DSpace 1.8 sche | 2017-11-28 08:31:30 | Success | | 1.8.2.0 | DSpaceCRIS-crismodule data | | Ignored | | 1.8.2.1 | DSpaceCRIS-crispubmed data | | Ignored | | 1.8.2.2 | DSpaceCRIS-subscription da | | Ignored | | 3.0 | Upgrade to DSpace 3.x sche | 2017-11-28 08:31:30 | Success | | 3.2.1.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 4.0 | Upgrade to DSpace 4.x sche | 2017-11-28 08:31:30 | Success | | 4.1.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 4.3.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2017-11-28 08:31:30 | Success | | 5.0.2014.09.25 | DS 1582 Metadata For All O | 2017-11-28 08:31:30 | Success | | 5.0.2014.09.26 | DS-1582 Metadata For All O | 2017-11-28 08:31:30 | Success | | 5.3.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.0.1 | FIX-SNAPSHOT-DSpaceCRIS-Up | | Ignored | | 5.3.0.2 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.0.3 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.0.4 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.0.5 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.0.6 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.1.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.3.1.1 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.4.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.4.0.1 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.0.1 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.1.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.1.1 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.1.2 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.1.3 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.5.1.4 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.6.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.6.0.1 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.6.2016.08.23 | DS-3097 | 2017-11-28 08:31:30 | Success | | 5.7.0.0 | DSpaceCRIS-Upgrade-crismod | | Ignored | | 5.7.2017.04.11 | DS-3563 Index metadatavalu | 2017-11-28 08:31:31 | Success | | 5.7.2017.05.05 | DS 3431 Add Policies for B | 2017-11-28 08:31:31 | Success | | 5.8.0.0 | DSpaceCRIS-Upgrade-crismod | | Pending | +----------------+----------------------------+---------------------+---------+ Am I missing something? Please help. Thanks in advance and best regards, euler -- You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group. To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscr...@googlegroups.com. To post to this group, send email to dspace-tech@googlegroups.com. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.