Hi David, You are correct, this is related to the bug report in DS-2824. The problem is that you seem to have somehow created two Groups of the *same name*. In your situation, the errors is saying you have two groups named "COLLECTION_29_DEFAULT_READ". Group Names are supposed to be unique (and uniqueness is now guaranteed at the database level). This is a very rare scenario, as DSpace should have never allowed two groups of the same name to be created. But, somehow this seems to have occurred at least a few times (on your site, and on the site that reported bug DS-2824).
In any case, the fix should be to look for two groups named COLLECTION_29_DEFAULT_READ (this group is named oddly because it is the group that is providing DEFAULT_READ permissions to your Collection with ID=29). Figure out which one is the correct one, and delete the other one. If you rerun the migration it should now succeed (again assuming there are no other duplicative groups -- but there hopefully should not be). Good luck, Tim On Thu, Feb 28, 2019 at 2:29 PM David Baker <[email protected]> wrote: > Anybody have any ideas why I'm running into this? > I found this bug report https://jira.duraspace.org/browse/DS-2824 but > don't understand how the issue was resolved in that case. > Thanks. > > > On Thursday, February 28, 2019 at 3:27:27 PM UTC-5, David Baker wrote: >> >> I'm upgrading DSpace on Windows Server 2012 from version 5.3 to 6.3 >> >> Here's the output of bin\dspace database info: >> >> Using DSpace installation in: c:\dspace >> >> Database Type: postgres >> Database URL: jdbc:postgresql://localhost:5432/dspace >> Database Schema: public >> Database Username: dspace >> Database Software: PostgreSQL version 9.4.17 >> Database Driver: PostgreSQL JDBC Driver version 42.2.1 >> PostgreSQL 'pgcrypto' extension installed/up-to-date? true (version=1.1) >> >> >> +----------------+-----------------------------------------------------+---------------------+---------+ >> | Version | Description | >> Installed on | State | >> >> +----------------+-----------------------------------------------------+---------------------+---------+ >> | 1 | << Flyway Init >> | >> 2015-06-09 12:16:21 | Baselin | >> | 1.1 | Initial DSpace 1.1 database schema | >> 2015-06-09 12:16:22 | Success | >> | 1.2 | Upgrade to DSpace 1.2 schema | >> 2015-06-09 12:16:22 | Success | >> | 1.3 | Upgrade to DSpace 1.3 schema | >> 2015-06-09 12:16:22 | Success | >> | 1.3.9 | Drop constraint for DSpace 1 4 schema | >> 2015-06-09 12:16:23 | Success | >> | 1.4 | Upgrade to DSpace 1.4 schema | >> 2015-06-09 12:16:23 | Success | >> | 1.5 | Upgrade to DSpace 1.5 schema | >> 2015-06-09 12:16:23 | Success | >> | 1.5.9 | Drop constraint for DSpace 1 6 schema | >> 2015-06-09 12:16:24 | Success | >> | 1.6 | Upgrade to DSpace 1.6 schema | >> 2015-06-09 12:16:24 | Success | >> | 1.7 | Upgrade to DSpace 1.7 schema | >> 2015-06-09 12:16:24 | Success | >> | 1.8 | Upgrade to DSpace 1.8 schema | >> 2015-06-09 12:16:24 | Success | >> | 3.0 | Upgrade to DSpace 3.x schema | >> 2015-06-09 12:16:24 | Success | >> | 4.0 | Upgrade to DSpace 4.x schema | >> 2015-06-09 12:16:24 | Success | >> | 4.9.2015.10.26 | DS-2818 registry update >> | | Ignored | >> | 5.0.2014.08.08 | DS-1945 Helpdesk Request a Copy | >> 2015-06-09 12:16:24 | Success | >> | 5.0.2014.09.25 | DS 1582 Metadata For All Objects drop constraint | >> 2015-06-09 12:16:24 | Success | >> | 5.0.2014.09.26 | DS-1582 Metadata For All Objects | >> 2015-06-09 12:16:24 | Success | >> | 5.6.2016.08.23 | DS-3097 | >> 2019-02-28 14:52:18 | Success | >> | 5.7.2017.04.11 | DS-3563 Index metadatavalue resource type id column | >> 2019-02-28 14:52:20 | Success | >> | 5.7.2017.05.05 | DS 3431 Add Policies for BasicWorkflow | >> 2019-02-28 14:52:21 | Success | >> | 6.0.2015.03.06 | DS 2701 Dso Uuid Migration | >> 2019-02-28 14:52:22 | Success | >> | 6.0.2015.03.07 | DS-2701 Hibernate migration | >> 2019-02-28 14:52:23 | Success | >> | 6.0.2015.08.31 | DS 2701 Hibernate Workflow Migration | >> 2019-02-28 14:54:57 | Success | >> | 6.0.2016.01.03 | DS-3024 | >> 2019-02-28 14:54:57 | Success | >> | 6.0.2016.01.26 | DS 2188 Remove DBMS Browse Tables | >> 2019-02-28 14:54:58 | Success | >> | 6.0.2016.02.25 | DS-3004-slow-searching-as-admin >> | | Pending | >> | 6.0.2016.04.01 | DS-1955 Increase embargo reason >> | | Pending | >> | 6.0.2016.04.04 | DS-3086-OAI-Performance-fix >> | | Pending | >> | 6.0.2016.04.14 | DS-3125-fix-bundle-bitstream-delete-rights >> | | Pending | >> | 6.0.2016.05.10 | DS-3168-fix-requestitem item id column >> | | Pending | >> | 6.0.2016.07.21 | DS-2775 >> | | Pending | >> | 6.0.2016.07.26 | DS-3277 fix handle assignment >> | | Pending | >> | 6.0.2016.08.23 | DS-3097 >> | | Pending | >> | 6.1.2017.01.03 | DS 3431 Add Policies for BasicWorkflow >> | | Pending | >> >> +----------------+-----------------------------------------------------+---------------------+---------+ >> >> >> Then there's this in my dspace.log file: >> >> >> 2019-02-28 14:54:58,834 INFO >> org.flywaydb.core.internal.command.DbMigrate @ Migrating schema "public" to >> version 6.0.2016.02.25 - DS-3004-slow-searching-as-admin >> 2019-02-28 14:54:58,928 INFO >> org.flywaydb.core.internal.dbsupport.JdbcTemplate @ DB: column "name" of >> relation "epersongroup" does not exist, skipping >> 2019-02-28 14:54:59,537 ERROR >> org.flywaydb.core.internal.command.DbMigrate @ Migration of schema "public" >> to version 6.0.2016.02.25 - DS-3004-slow-searching-as-admin failed! Changes >> successfully rolled back. >> 2019-02-28 14:54:59,537 FATAL org.dspace.core.Context @ Cannot initialize >> database via Flyway! >> java.sql.SQLException: Flyway migration error occurred >> at >> org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:673) >> at >> org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:576) >> at >> org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:552) >> at org.dspace.core.Context.<clinit>(Context.java:103) >> at >> org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:74) >> at >> org.dspace.app.util.DSpaceWebappListener.contextInitialized(DSpaceWebappListener.java:31) >> at >> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792) >> at >> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256) >> at >> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) >> at >> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) >> at >> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) >> at >> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) >> at >> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140) >> at >> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875) >> at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) >> at java.util.concurrent.FutureTask.run(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >> at java.lang.Thread.run(Unknown Source) >> Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: >> Migration V6.0_2016.02.25__DS-3004-slow-searching-as-admin.sql failed >> --------------------------------------------------------------------- >> SQL State : 23505 >> Error Code : 0 >> Message : ERROR: duplicate key value violates unique constraint >> "epersongroup_unique_idx_name" >> Detail: Key (name)=(COLLECTION_29_DEFAULT_READ) already exists. >> Location : >> org/dspace/storage/rdbms/sqlmigration/postgres/V6.0_2016.02.25__DS-3004-slow-searching-as-admin.sql >> (C:\Program Files\apache-tomcat-8.5.31\file:\C:\Program >> Files\apache-tomcat-8.5.31\webapps\ROOT\WEB-INF\lib\dspace-api-6.3.jar!\org\dspace\storage\rdbms\sqlmigration\postgres\V6.0_2016.02.25__DS-3004-slow-searching-as-admin.sql) >> Line : 26 >> Statement : UPDATE epersongroup >> SET name = >> (SELECT text_value >> FROM metadatavalue v >> JOIN metadatafieldregistry field on v.metadata_field_id = >> field.metadata_field_id >> JOIN metadataschemaregistry s ON field.metadata_schema_id = >> s.metadata_schema_id >> WHERE s.short_id = 'dc' AND element = 'title' AND qualifier IS NULL >> AND v.dspace_object_id = epersongroup.uuid LIMIT 1) >> >> at >> org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:117) >> at >> org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:71) >> at >> org.flywaydb.core.internal.command.DbMigrate.doMigrate(DbMigrate.java:352) >> at >> org.flywaydb.core.internal.command.DbMigrate.access$1100(DbMigrate.java:47) >> at >> org.flywaydb.core.internal.command.DbMigrate$4.doInTransaction(DbMigrate.java:308) >> at >> org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72) >> at >> org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate.java:305) >> at >> org.flywaydb.core.internal.command.DbMigrate.access$1000(DbMigrate.java:47) >> at >> org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:230) >> at >> org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:173) >> at >> org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72) >> at >> org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:173) >> at org.flywaydb.core.Flyway$1.execute(Flyway.java:959) >> at org.flywaydb.core.Flyway$1.execute(Flyway.java:917) >> at org.flywaydb.core.Flyway.execute(Flyway.java:1373) >> at org.flywaydb.core.Flyway.migrate(Flyway.java:917) >> at >> org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:662) >> ... 18 more >> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value >> violates unique constraint "epersongroup_unique_idx_name" >> Detail: Key (name)=(COLLECTION_29_DEFAULT_READ) already exists. >> at >> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2422) >> at >> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2167) >> at >> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) >> at >> org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) >> at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) >> at >> org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307) >> at >> org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293) >> at >> org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270) >> at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266) >> at >> org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) >> at >> org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291) >> at >> org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(JdbcTemplate.java:238) >> at >> org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:114) >> >> > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > -- Tim Donohue Technical Lead for DSpace & DSpaceDirect DuraSpace.org | DSpace.org | DSpaceDirect.org -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
