XML Configurable workflow migration error

62 views
Skip to first unread message

Alex Fletcher

unread,
May 16, 2016, 10:55:48 AM5/16/16
to DSpace Technical Support
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

Tim Donohue

unread,
May 17, 2016, 5:45:10 PM5/17/16
to dspac...@googlegroups.com

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

--
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...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
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

Alex Fletcher

unread,
May 18, 2016, 8:36:34 AM5/18/16
to DSpace Technical Support
Tim:

Thanks, that worked, though the actual command I needed was:

./dspace database repair

Once that was run, I ran the "database migrate" command by hand, and it worked well with no complaints, and it's back online now.

On this -dev machine, we built the DB from scratch on a 5.2 install (we've bumped through 5.3, 5.4, and now onto 5.5). We have decided to use the configurable workflows, and I enabled them as per the documentation. When I worked through that, restarted/etc, that's when the checksum error (below) occurred.

Alex

Tim Donohue

unread,
May 18, 2016, 9:28:50 AM5/18/16
to dspac...@googlegroups.com

Alex,

Glad to hear it worked! Yes, you are correct, I mistyped that command in my response. The correct command *is*

./dspace database repair

We'll have to look into whether this command needs to be run for anyone who wants to later enable XML Configurable Workflow.

- Tim

Reply all
Reply to author
Forward
0 new messages