Hi Alex,

This sounds like you've previously run this migration against the database, but the Flyway tool assigned a different "Migration Checksum".

You should be able to get around this by running..

./dspace migrate repair

The "repair" command tells Flyway to ignore the old "checksum" and replace it with the newly computed value.

However, I also wonder how you encountered this scenario. Did you happen to move this database from one server to another (sometimes that causes a Flyway checksum mismatch at the DB level)?

- Tim


On 5/16/2016 9:55 AM, Alex Fletcher wrote:
I have been working to add configurable workflows to our test DSpace implementation (v5.5). I set up the xmlui.xconf and the modules/workflow.cfg file as per the documentation, and then ran the tomcat restart which is supposed to migrate the DB automatically.

When I connect to the DSpace instance, it is a blank page, and looking at the log file I see the following:



2016-05-16 10:37:04,907 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:430) at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:338) at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1373) at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:650) at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:629)
        at org.dspace.core.Context.init(Context.java:121)
        at org.dspace.core.Context.<init>(Context.java:95)
at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:79) at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:128) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1862) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration Checksum mismatch for migration V1.1__Initial_DSpace_1.1_database_schema.sql: DB=1058944165, Classpath=864087011
        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:419)
        ... 21 more


On a whim, I tried running the migrate by hand and got the same error.

What's gone wrong here and how can we resolve this to continue our implementation work?

Alex
--
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] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[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

--
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.

Reply via email to