<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Brent-</p>
<p><br>
</p>
<p>Were you running the container manager plugin in 1.4? If so, here's how I managed to get the migrations, etc to happen in my local test instance. Dartmouth is still in 1.3 in production and I haven't tested this in our dev and pre-prod server environments.</p>
<p><br>
</p>
<p>1) With the container plugin in the active plugins list in config.rb, run the setup database script</p>
<p>2) Remove the container manager plugin from the list of active plugins in config.rb</p>
<p>3) Remove the /data/indexer_state and /data/solr_index/index contents</p>
<p>4) start the app back up</p>
<p>5) Wait while the indexer works<img alt="😉" id="OWAEmoji364616" class="EmojiInsert" style="vertical-align:bottom" src="cid:bc16e8d6-4f30-456f-bd92-657c21211168"></p>
<p><br>
</p>
<p>If you haven't been running the container manager plugin, then I'm left scratching my head too.</p>
<p><br>
</p>
<p>Joshua<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Brent Ellingson
<brent_ellingson@byu.edu><br>
<b>Sent:</b> Thursday, August 4, 2016 4:28:26 PM<br>
<b>To:</b> Archivesspace Users Group (archivesspace_users_group@lyralists.lyrasis.org) (archivesspace_users_group@lyralists.lyrasis.org)<br>
<b>Subject:</b> [Archivesspace_Users_Group] DB error when trying to upgrade from 1.4.2 to 1.5.1</font>
<div> </div>
</div>
<div>
<div style="">
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
We are trying to upgrade an instance of ArchivesSpace from 1.4.2 to 1.5.1 and we’re getting the following error message.</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Some help or thoughts on how to overcome this error would be appreciated.</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
*** Error message ***</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Database migration error. </p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Your upgrade has encountered a problem. </p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
You must resolve these issues before the database migration can complete.</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Error: </p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
#<Sequel::DatabaseError: Java::ComMysqlJdbcExceptionsJdbc4::MySQLSyntaxErrorException: Table 'top_container' already exists></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Java::ComMysqlJdbcExceptionsJdbc4::MySQLSyntaxErrorException: Table 'top_container' already exists</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:411)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.Util.getInstance(com/mysql/jdbc/Util.java:386)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:1054)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:4187)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:4119)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.MysqlIO.sendCommand(com/mysql/jdbc/MysqlIO.java:2570)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.MysqlIO.sqlQueryDirect(com/mysql/jdbc/MysqlIO.java:2731)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.ConnectionImpl.execSQL(com/mysql/jdbc/ConnectionImpl.java:2809)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.ConnectionImpl.execSQL(com/mysql/jdbc/ConnectionImpl.java:2758)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.StatementImpl.execute(com/mysql/jdbc/StatementImpl.java:894)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
com.mysql.jdbc.StatementImpl.execute(com/mysql/jdbc/StatementImpl.java:732)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:254)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.log_yield(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/logging.rb:33)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:254)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.statement(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:646)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.hold(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.synchronize(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:255)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.execute_ddl(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:270)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.create_table_from_generator(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:641)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.create_table(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:195)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.(root)(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/060_top_container_migration.rb:30)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1574)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.apply(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.checked_transaction(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.setup_database(file:/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/db_migrator.rb:185)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
$_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:43)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
$_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/rb/../scripts/rb/migrate_db.rb:43)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
$_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:28)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
$_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/rb/../scripts/rb/migrate_db.rb:28)</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
*** End error message ***</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
Regards,</p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<u><span style="font-size:10.0pt; color:#365F91">__________________________</span></u></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<span style="font-size:10.0pt; color:#365F91">Brent Ellingson</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<span style="font-size:10.0pt; color:#365F91">Sr. Software Engineer</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<span style="font-size:10.0pt; color:#365F91">2750 Harold B. Lee Library</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<span style="font-size:10.0pt; color:#365F91">Brigham Young University</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
<span style="font-size:10.0pt; color:#365F91">(801)422-6148</span></p>
<p style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: "Calibri",sans-serif;">
</p>
</div>
</div>
</div>
</body>
</html>