[Archivesspace_Users_Group] Database troubles upgrading from 1.4.2 to 1.5.1

Jason Loeffler j at minorscience.com
Thu Dec 1 15:51:20 EST 2016


Can you post the contents of your rights_restriction_type table? (Please
redact any confidential data.)

I'd like to add that we've been running against MariaDB since 1.4.2 without
any issues. Just wanted to rule that out in case anyone is wondering.

Jason Loeffler
Technology Consultant | The American Academy in Rome
Minor Science | Application Development & Metadata Strategy
Brooklyn, New York
jason at minorscience.com
(347) 405-0826
minorscience (Skype)



On Thu, Dec 1, 2016 at 3:27 PM, Brent Ellingson <brent_ellingson at byu.edu>
wrote:

> We are trying to upgrade a test instance of ArchivesSpace from 1.4.2 to
> 1.5.1 and we have run into some SQL errors that have prevented the upgrade.
> We are using a copy of the production data.
>
>
>
> Some help or suggestions would be greatly appreciated.
>
>
>
> Here is basically what we have done.
>
> * Get a MySQL dump of the production DB
>
> * Copy the DB to a new server (now running MariaDB)
>
> * Installed ArchivesSpace 1.4.2
>
> * Started & indexed the 1.4.2 instance
>
> * Tested the 1.4.2 instance and it was running fine
>
> * Started the upgrade process for 1.5.1
>
> * Stopped the 1.4.2 instance
>
> * Unzipped the 1.5.1 archive to a new place
>
> * Copied the data files to the 1.5.1/data directory
>
> * Copied the config.rb
>
> * Copied the mysql jdbc jar to lib
>
> * Copied the plugins (we don't have any that I know of)
>
> * Checked the en.yml files
>
> * Ran the setup-database.sh script
>
> * Setup stopped due to a Database error
>
>
>
> Here is the text of the error we are seeing from the log file:
>
> **** Begin error log output ****
>
> Loading ArchivesSpace configuration file from path:
> /opt/archivesspace-1.5.1/archivesspace/config/config.rb
>
> Loading ArchivesSpace configuration file from path:
> /opt/archivesspace-1.5.1/archivesspace/config/config.rb
>
> Running migrations against jdbc:mysql://[DB_SERVER]:3306/
> [DB_NAME]?user=[REDACTED]&password=[REDACTED]&useUnicode=true&
> characterEncoding=UTF-8
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
>
>
>      3
>
>
>
>
>
>      Database migration error.
>
>      Your upgrade has encountered a problem.
>
>      You must resolve these issues before the database migration can
> complete.
>
>
>
>
>
>      Error:
>
>      #<Sequel::UniqueConstraintViolation: Java::
> ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException:
> Duplicate entry 'restriction_type' for key 'name'>
>
>      Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException:
> Duplicate entry 'restriction_type' for key 'name'
>
>      java.lang.reflect.Constructor.newInstance(java/lang/reflect/
> Constructor.java:423)
>
> com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:425)
>
> com.mysql.jdbc.Util.getInstance(com/mysql/jdbc/Util.java:408)
>
> com.mysql.jdbc.SQLError.createSQLException(com/mysql/
> jdbc/SQLError.java:935)
>
> com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3970)
>
> com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3906)
>
> com.mysql.jdbc.MysqlIO.sendCommand(com/mysql/jdbc/MysqlIO.java:2524)
>
> com.mysql.jdbc.MysqlIO.sqlQueryDirect(com/mysql/jdbc/MysqlIO.java:2677)
>
> com.mysql.jdbc.ConnectionImpl.execSQL(com/mysql/jdbc/
> ConnectionImpl.java:2545)
>
> com.mysql.jdbc.StatementImpl.executeUpdateInternal(com/
> mysql/jdbc/StatementImpl.java:1540)
>
> com.mysql.jdbc.StatementImpl.executeLargeUpdate(com/mysql/
> jdbc/StatementImpl.java:2603)
>
> com.mysql.jdbc.StatementImpl.executeUpdate(com/mysql/jdbc/
> StatementImpl.java:1604)
>
> java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
>
> RUBY.execute_statement_insert(/opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> adapters/jdbc/mysql.rb:68)
>
> RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:256)
>
> RUBY.log_yield(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/database/logging.rb:33)
>
> RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:256)
>
> RUBY.statement(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:646)
>
> RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245)
>
> RUBY.hold(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98)
>
> RUBY.synchronize(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/database/connecting.rb:255)
>
> RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244)
>
> RUBY.execute_insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/adapters/jdbc.rb:276)
>
> RUBY.execute_insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/dataset/actions.rb:927)
>
> RUBY.insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/dataset/actions.rb:336)
>
> RUBY.create_enum(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/
> db/migrations/utils.rb:45)
>
> RUBY.create_editable_enum(/opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/migrations/utils.rb:38)
>
> RUBY.(root)(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/
> db/migrations/060_top_container_migration.rb:15)
>
> org.jruby.RubyBasicObject.instance_eval(org/jruby/
> RubyBasicObject.java:1574)
>
> RUBY.apply(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:100)
>
> RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:528)
>
> RUBY.checked_transaction(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:466)
>
> RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:527)
>
> org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)
>
> RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:524)
>
> RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/extensions/migration.rb:391)
>
> RUBY.setup_database(file:/opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/db_migrator.rb:185)
>
> $_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:43)
>
> $_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/
> rb/../scripts/rb/migrate_db.rb:43)
>
> RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/database/connecting.rb:69)
>
> RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/
> sequel-4.20.0/lib/sequel/core.rb:95)
>
> $_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:28)
>
> $_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/
> rb/../scripts/rb/migrate_db.rb:28)
>
>
>
>
>
>      3
>
> Sequel::UniqueConstraintViolation: Java::ComMysqlJdbcExceptionsJdbc4::
> MySQLIntegrityConstraintViolationException: Duplicate entry
> 'restriction_type' for key 'name'
>
>            raise_error at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/misc.rb:423
>
>              statement at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:648
>
>                execute at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245
>
>                   hold at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> connection_pool/threaded.rb:98
>
>            synchronize at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> database/connecting.rb:255
>
>                execute at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244
>
>         execute_insert at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:276
>
>         execute_insert at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:927
>
>                 insert at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:336
>
>            create_enum at /opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/migrations/utils.rb:45
>
>   create_editable_enum at /opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/migrations/utils.rb:38
>
>                 (root) at /opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/migrations/060_top_
> container_migration.rb:15
>
>          instance_eval at org/jruby/RubyBasicObject.java:1574
>
>                  apply at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:100
>
>                    run at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:528
>
>    checked_transaction at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:466
>
>                    run at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:527
>
>                   each at org/jruby/RubyArray.java:1613
>
>                    run at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:524
>
>                    run at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/
> extensions/migration.rb:391
>
>         setup_database at file:/opt/archivesspace-1.5.1/
> archivesspace/lib/common.jar!/db/db_migrator.rb:185
>
>                 (root) at ../scripts/rb/migrate_db.rb:43
>
>                connect at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69
>
>                connect at /opt/archivesspace-1.5.1/
> archivesspace/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95
>
>                 (root) at ../scripts/rb/migrate_db.rb:28
>
> **** End error log output ****
>
>
>
> Thank you for your time.
>
>
>
> Regards,
>
> *__________________________*
>
> Brent Ellingson
>
> Sr. Software Engineer
>
> 2750 Harold B. Lee Library
>
> Brigham Young University
>
> (801)422-6148 <(801)%20422-6148>
>
>
>
> _______________________________________________
> Archivesspace_Users_Group mailing list
> Archivesspace_Users_Group at lyralists.lyrasis.org
> http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20161201/42910efb/attachment.html>


More information about the Archivesspace_Users_Group mailing list