DSpace-CRIS Database Update Failure

488 views
Skip to first unread message

Sean Carte

unread,
Aug 30, 2016, 8:34:58 AM8/30/16
to DSpace Technical Support
I'm trying to update a standard DSpace 5.5 installation into a DSpace-CRIS installation. But problems arise after tomcat is started, during the flyway db update.

I'm running this on Ubuntu 16.04, PostgreSQL 9.5, Tomcat 7, OpenJDK 1.8.

Any suggestions on how I can get around this?

The steps I took and the dspace log are copied below.

I downloaded the source code from https://github.com/Cineca/DSpace/tree/dspace-cris-5.5.0

dspace@dspace:~/DSpace-dspace-cris-5.5.0$ mvn -U clean package
 ... 
[INFO] BUILD SUCCESS
...
dspace@dspace:~/DSpace-dspace-cris-5.5.0$ cd dspace/target/dspace-installer/
dspace@dspace:~/DSpace-dspace-cris-5.5.0/dspace/target/dspace-installer$ ant update
...
BUILD SUCCESSFUL
Total time: 1 minute 1 second
dspace@dspace:~/DSpace-dspace-cris-5.5.0/dspace/target/dspace-installer$ cd /dspace/
dspace@dspace:/dspace$ mkdir rp-files
dspace@dspace:/dspace$ mkdir rg-files
dspace@dspace:/dspace$ mkdir ou-files
dspace@dspace:/dspace$ mkdir do-files
dspace@dspace:/dspace$ mkdir ws-xsd
dspace@dspace:/dspace$ cp -r /home/dspace/DSpace-dspace-cris-5.5.0/dspace/etc/webservice/* ws-xsd/
dspace@dspace:/dspace$ logout
root@dspace:~# service tomcat7 restart

root@dspace:~# tail -f /dspace/log/dspace.log.2016-08-30
2016-08-30 13:19:12,014 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading F
lyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.
storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migratio
n
2016-08-30 13:19:12,145 INFO  org.dspace.storage.rdbms.DatabaseUtils @ DSpace da
tabase schema is up to date
2016-08-30 13:19:31,044 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is
 'PostgreSQL'
2016-08-30 13:19:31,046 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS dr
iver version is '9.5.4'
2016-08-30 13:19:31,078 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading F
lyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.
storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migratio
n
2016-08-30 13:19:31,109 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFact
ory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 13:19:31,179 INFO  org.dspace.storage.rdbms.DatabaseUtils @ DSpace da
tabase schema is up to date
2016-08-30 13:19:33,861 INFO  org.dspace.content.MetadataSchema @ Loading schema
 cache for fast finds
2016-08-30 13:19:33,889 INFO  org.dspace.content.MetadataField @ Loading Metadat
aField elements into cache.
2016-08-30 13:19:34,522 INFO  org.dspace.app.xmlui.aspect.artifactbrowser.Commun
ityBrowser @ anonymous:session_id=E5A4709B5B44D932EBB86F788B2F03CE:ip_addr=10.0.
36.134:view_community_list:
2016-08-30 13:19:34,536 INFO  org.dspace.app.xmlui.aspect.discovery.SidebarFacet
sTransformer @ facets for scope, null: 3
2016-08-30 13:56:41,449 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is
 'PostgreSQL'
2016-08-30 13:56:41,452 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS dr
iver version is '9.5.4'
2016-08-30 13:56:41,494 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading F
lyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.
storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migratio
n
2016-08-30 13:56:41,573 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFact
ory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 13:56:41,721 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-30 13:56:41,722 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.0
DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:56:41,722 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.1
DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:56:41,759 INFO  org.flywaydb.core.internal.command.DbValidate @ Va
lidated 32 migrations (execution time 00:00.030s)
2016-08-30 13:56:41,761 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL get
DataSource Error -
java.sql.SQLException: Flyway migration error occurred
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j
ava:483)
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j
ava:391)
        at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.j
ava:1378)
        at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManage
r.java:653)
        at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManage
r.java:632)
        at org.dspace.core.Context.init(Context.java:145)
        at org.dspace.core.Context.<init>(Context.java:119)
        at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebap
p.java:80)
        at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceCo
ntextListener.java:128)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:5068)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5584)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1547)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java
:1511)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1744)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:333)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
e.java:1371)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1543)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1553)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1521)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differe
nces between applied migrations and available migrations: Migration on the class
path has not been applied to database: 3.2.1.0
        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.j
ava:472)
        ... 22 more
2016-08-30 13:57:26,647 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is
 'PostgreSQL'
2016-08-30 13:57:26,650 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS dr
iver version is '9.5.4'
2016-08-30 13:57:26,687 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading F
lyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.
storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migratio
n
2016-08-30 13:57:26,724 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFact
ory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 13:57:26,870 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending D
Space database schema migrations:
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.0
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.1
FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.2
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.3
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.4
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.5
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.6
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.1.0
DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:57:26,871 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:57:26,954 INFO  org.flywaydb.core.internal.command.DbValidate @ Va
lidated 32 migrations (execution time 00:00.062s)
2016-08-30 13:57:26,955 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL get
DataSource Error -
java.sql.SQLException: Flyway migration error occurred
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j
ava:483)
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.j
ava:391)
        at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.j
ava:1378)
        at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManage
r.java:653)
        at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManage
r.java:632)
        at org.dspace.core.Context.init(Context.java:145)
        at org.dspace.core.Context.<init>(Context.java:119)
        at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebap
p.java:80)
        at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceCo
ntextListener.java:128)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:5068)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5584)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        at org.apache.catalina.startup.HostConfig.reload(HostConfig.java:1547)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java
:1511)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1744)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:333)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBa
se.java:90)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
e.java:1371)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1543)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1553)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1521)
    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 on the classpath has not been applied to database: 3.2.1.0
    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:472)
    ... 22 more
2016-08-30 13:58:31,489 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is 'PostgreSQL'
2016-08-30 13:58:31,493 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS driver version is '9.5.4'
2016-08-30 13:58:31,563 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading Flyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migration
2016-08-30 13:58:31,605 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFactory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 13:58:31,837 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-30 13:58:31,838 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,838 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.1 FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,838 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.2 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,838 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.3 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,838 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.4 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.5 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.6 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:58:31,839 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:58:31,882 INFO  org.flywaydb.core.internal.command.DbValidate @ Validated 32 migrations (execution time 00:00.038s)
2016-08-30 13:58:31,884 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:483)
    at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:391)
    at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1378)
    at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:653)
    at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:632)
    at org.dspace.core.Context.init(Context.java:145)
    at org.dspace.core.Context.<init>(Context.java:119)
    at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:80)
    at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:128)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    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 on the classpath has not been applied to database: 3.2.1.0
    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:472)
    ... 25 more
2016-08-30 13:59:14,609 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is 'PostgreSQL'
2016-08-30 13:59:14,613 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS driver version is '9.5.4'
2016-08-30 13:59:14,656 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading Flyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migration
2016-08-30 13:59:14,695 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFactory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 13:59:14,802 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-30 13:59:14,803 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,808 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.1 FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,809 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.2 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,809 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.3 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,809 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.4 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,809 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.5 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,809 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.6 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,810 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,810 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 13:59:14,810 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:59:14,810 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 13:59:14,880 INFO  org.flywaydb.core.internal.command.DbValidate @ Validated 32 migrations (execution time 00:00.057s)
2016-08-30 13:59:14,885 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:483)
    at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:391)
    at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1378)
    at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:653)
    at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:632)
    at org.dspace.core.Context.init(Context.java:145)
    at org.dspace.core.Context.<init>(Context.java:119)
    at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:80)
    at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:128)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    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 on the classpath has not been applied to database: 3.2.1.0
    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:472)
    ... 25 more
2016-08-30 14:00:04,741 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading Flyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migration
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.1 FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.2 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.3 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.4 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,913 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.5 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,914 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.6 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,914 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,914 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:04,914 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 14:00:04,914 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 14:00:58,914 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is 'PostgreSQL'
2016-08-30 14:00:58,917 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS driver version is '9.5.4'
2016-08-30 14:00:58,959 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading Flyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migration
2016-08-30 14:00:58,996 INFO  org.flywaydb.core.internal.dbsupport.DbSupportFactory @ Database: jdbc:postgresql://localhost:5432/dspace (PostgreSQL 9.5)
2016-08-30 14:00:59,226 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-30 14:00:59,227 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,228 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.1 FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,228 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.2 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,228 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.3 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,228 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.4 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.5 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.0.6 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 14:00:59,229 INFO  org.dspace.storage.rdbms.DatabaseUtils @     5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-30 14:00:59,289 INFO  org.flywaydb.core.internal.command.DbValidate @ Validated 32 migrations (execution time 00:00.054s)
2016-08-30 14:00:59,291 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:483)
    at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:391)
    at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1378)
    at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:653)
    at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:632)
    at org.dspace.core.Context.init(Context.java:145)
    at org.dspace.core.Context.<init>(Context.java:119)
    at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:80)
    at org.dspace.app.util.DSpaceContextListener.contextInitialized(DSpaceContextListener.java:128)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:133)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:156)
    at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:145)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1962)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    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 on the classpath has not been applied to database: 3.2.1.0
    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:472)
    ... 25 more
^C

Sean
--

Tim Donohue

unread,
Aug 30, 2016, 9:58:42 AM8/30/16
to Sean Carte, DSpace Technical Support

Hi Sean,

In the version of Flyway (3.x) used by DSpace 5.5, a validation error ("Caused by: org.flywaydb.core.api.FlywayException: Validate failed.") often is the result of running migrations from different OSes (e.g. Ubuntu vs Mac vs Windows) or sometimes even different servers.  When Flyway "validates" a migration, it just generates a checksum from the validation file.  Unfortunately, in this version of Flyway, the checksum generated was different based on the operating system, etc.

In any case, this error is usually something that can be safely ignored/corrected.  To tell Flyway to ignore the validation issues and update the checksums, simply run:

[dspace]/bin/dspace database repair

This runs a "repair" in Flyway, which just regenerates the checksums of all migrations on the current server. It will ensure validation should no longer fail on this server in the future.

After running the "repair", you should be able to rerun the migrations successfully.

As a sidenote, in Flyway 4 (which we are upgrading to in DSpace 6), this issue is resolved. They've figured out a better way to generate these checksums so that they are now supposedly the same cross-platform.  So, hopefully this sort of validation issue will happen less in the future.

- 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

Sean Carte

unread,
Aug 31, 2016, 4:12:30 AM8/31/16
to Tim Donohue, DSpace Technical Support
Thanks, Tim. Unfortunately, that did not work. I've copied the logs below.

I am copying the database from production to a test environment, but both VMs are running Ubuntu 16.04 and PostgreSQL 9.5.

(As a sanity-check, I restored from backup and was able to update using the regular DSpace 5.5 without issues. I have also previously managed to update to DSpace 6.0.)

dspace@dspace:~$ /dspace/bin/dspace database repair

Database URL: jdbc:postgresql://localhost:5432/dspace
Attempting to repair any previously failed migrations via FlywayDB... (Check logs for details)
Done.

dspace@dspace:~$ less /dspace/log/dspace.log.2016-08-31
2016-08-31 07:29:15,470 INFO  com.mchange.v2.log.MLog @ MLog clients using log4j logging.
2016-08-31 07:29:15,697 INFO  com.mchange.v2.c3p0.C3P0Registry @ Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
2016-08-31 07:29:16,442 INFO  org.hibernate.annotations.common.Version @ HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
2016-08-31 07:29:16,460 INFO  org.hibernate.Version @ HHH000412: Hibernate Core {4.1.8.Final}
2016-08-31 07:29:16,468 INFO  org.hibernate.cfg.Environment @ HHH000205: Loaded properties from resource hibernate.properties: {hibernate.initialPoolSize=1, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, hibernate.maxPoolSize=10, hibernate.minPoolSize=4, hibernate.loginTimeout=300, hibernate.acquireIncrement=3, hibernate.idleConnectionTestPeriod=3000, hibernate.maxIdleTime=100, hibernate.maxStatements=100, hibernate.bytecode.use_reflection_optimizer=false}
2016-08-31 07:29:16,469 INFO  org.hibernate.cfg.Environment @ HHH000021: Bytecode provider name : javassist
2016-08-31 07:29:16,544 INFO  org.hibernate.cfg.Configuration @ HHH000044: Configuring from URL: jar:file:/dspace/lib/dspace-cris-api-CRIS-5.5.0.jar!/hibernate/hibernate-cris.cfg.xml
2016-08-31 07:29:16,711 INFO  org.hibernate.cfg.Configuration @ HHH000041: Configured SessionFactory: null
2016-08-31 07:29:17,956 INFO  com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource @ Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> z8kfsx9i1pw7mk1rkhgih|10ded6a9, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> z8kfsx9i1pw7mk1rkhgih|10ded6a9, idleConnectionTestPeriod -> 3000, initialPoolSize -> 1, jdbcUrl -> jdbc:postgresql://localhost:5432/dspace, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 100, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 10, maxStatements -> 100, maxStatementsPerConnection -> 0, minPoolSize -> 4, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
2016-08-31 07:29:18,484 INFO  org.hibernate.dialect.Dialect @ HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2016-08-31 07:29:18,516 INFO  org.hibernate.engine.jdbc.internal.LobCreatorBuilder @ HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2016-08-31 07:29:18,548 INFO  org.hibernate.engine.transaction.internal.TransactionFactoryInitiator @ HHH000399: Using default transaction strategy (direct JDBC transactions)
2016-08-31 07:29:18,554 INFO  org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory @ HHH000397: Using ASTQueryTranslatorFactory
2016-08-31 07:29:18,636 WARN  net.sf.ehcache.config.ConfigurationFactory @ No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/dspace/lib/ehcache-core-2.4.3.jar!/ehcache-failsafe.xml
2016-08-31 07:29:18,793 INFO  org.hibernate.cache.spi.UpdateTimestampsCache @ HHH000250: Starting update timestamps cache at region: org.hibernate.cache.spi.UpdateTimestampsCache
2016-08-31 07:29:18,796 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.hibernate.cache.spi.UpdateTimestampsCache]; using defaults.
2016-08-31 07:29:18,844 INFO  org.hibernate.cache.internal.StandardQueryCache @ HHH000248: Starting query cache at region: org.hibernate.cache.internal.StandardQueryCache
2016-08-31 07:29:18,846 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.hibernate.cache.internal.StandardQueryCache]; using defaults.
2016-08-31 07:29:19,042 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.model.ATypeNestedObject]; using defaults.
2016-08-31 07:29:19,057 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.model.AWidget]; using defaults.
2016-08-31 07:29:19,065 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.model.Containable]; using defaults.
2016-08-31 07:29:19,119 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.web.Tab]; using defaults.
2016-08-31 07:29:19,133 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.web.Box]; using defaults.
2016-08-31 07:29:19,160 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [it.cilea.osd.jdyna.model.PropertiesDefinition]; using defaults.
2016-08-31 07:29:19,521 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.BoxResearcherPage.mask]; using defaults.
2016-08-31 07:29:19,626 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.ProjectTypeNestedObject.mask]; using defaults.
2016-08-31 07:29:19,627 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.RPTypeNestedObject.mask]; using defaults.
2016-08-31 07:29:19,629 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.OUTypeNestedObject.mask]; using defaults.
2016-08-31 07:29:19,630 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.TabProject.mask]; using defaults.
2016-08-31 07:29:19,631 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.BoxOrganizationUnit.mask]; using defaults.
...
2016-08-31 07:29:19,648 WARN  org.hibernate.cache.ehcache.AbstractEhcacheRegionFactory @ HHH020003: Could not find a specific ehcache configuration for cache named [org.dspace.app.cris.model.jdyna.BoxProject.mask]; using defaults.
2016-08-31 07:29:20,976 INFO  net.sf.ehcache.util.UpdateChecker @ New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4]. Please check http://ehcache.org for the latest version.
2016-08-31 07:29:25,496 WARN  org.hibernate.hql.internal.ast.HqlSqlWalker @ [DEPRECATION] Encountered positional parameter near line 1, column 92.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
2016-08-31 07:29:25,498 WARN  org.hibernate.hql.internal.ast.HqlSqlWalker @ [DEPRECATION] Encountered positional parameter near line 1, column 108.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
...
2016-08-31 07:29:26,483 WARN  org.hibernate.hql.internal.ast.HqlSqlWalker @ [DEPRECATION] Encountered positional parameter near line 1, column 103.  Positional parameter are considered deprecated; use named parameters or JPA-style positional parameters instead.
2016-08-31 07:29:27,225 WARN  net.sf.ehcache.config.ConfigurationFactory @ No configuration found. Configuring ehcache from ehcache-failsafe.xml  found in the classpath: jar:file:/dspace/lib/ehcache-core-2.4.3.jar!/ehcache-failsafe.xml
2016-08-31 07:29:27,239 WARN  net.sf.ehcache.CacheManager @ Creating a new instance of CacheManager using the diskStorePath "/tmp" which is already used by an existing CacheManager.
The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$DefaultConfigurationSource@27dbaa33.
The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1472621367239.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
2016-08-31 07:29:27,241 WARN  net.sf.ehcache.Cache @ An API change between ehcache-1.1 and ehcache-1.2 results in the persistence path being set to /tmp when the ehcache-1.1 constructor is used. Please change to the 1.2 constructor.
2016-08-31 07:29:27,242 WARN  net.sf.ehcache.Cache @ An API change between ehcache-1.1 and ehcache-1.2 results in the persistence path being set to /tmp when the ehcache-1.1 constructor is used. Please change to the 1.2 constructor.
2016-08-31 07:29:27,242 WARN  net.sf.ehcache.Cache @ An API change between ehcache-1.1 and ehcache-1.2 results in the persistence path being set to /tmp when the ehcache-1.1 constructor is used. Please change to the 1.2 constructor.
2016-08-31 07:29:27,242 WARN  net.sf.ehcache.Cache @ An API change between ehcache-1.1 and ehcache-1.2 results in the persistence path being set to /tmp when the ehcache-1.1 constructor is used. Please change to the 1.2 constructor.
2016-08-31 07:29:28,501 WARN  net.sf.ehcache.CacheManager @ Creating a new instance of CacheManager using the diskStorePath "/tmp" which is already used by an existing CacheManager.
The source of the configuration was net.sf.ehcache.config.generator.ConfigurationSource$InputStreamConfigurationSource@485c84d7.
The diskStore path for this CacheManager will be set to /tmp/ehcache_auto_created_1472621368501.
To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
2016-08-31 07:29:29,028 INFO  net.sf.ehcache.util.UpdateChecker @ New update(s) found: 2.4.7 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+Core+2.4]. Please check http://ehcache.org for the latest version.
2016-08-31 07:29:30,571 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Loading Flyway DB migrations from: filesystem:/dspace/etc/postgres, classpath:org.dspace.storage.rdbms.sqlmigration.postgres, classpath:org.dspace.storage.rdbms.migration
2016-08-31 07:29:30,757 INFO  org.flywaydb.core.internal.metadatatable.MetaDataTableImpl @ Repair of metadata table "public"."schema_version" not necessary. No failed migration detected.
2016-08-31 07:29:30,851 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS is 'PostgreSQL'
2016-08-31 07:29:30,851 INFO  org.dspace.storage.rdbms.DatabaseManager @ DBMS driver version is '9.5.4'
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @ Pending DSpace database schema migrations:
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.1 FIX-SNAPSHOT-DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.2 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.3 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.4 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.5 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,960 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.0.6 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,964 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.1.0 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,964 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.3.1.1 DSpaceCRIS-Upgrade-crismodule 5 to 53 SQL PENDING
2016-08-31 07:29:30,964 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.0 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-31 07:29:30,964 INFO  org.dspace.storage.rdbms.DatabaseUtils @  5.4.0.1 DSpaceCRIS-Upgrade-crismodule 5 to 54 SQL PENDING
2016-08-31 07:29:31,006 INFO  org.flywaydb.core.internal.command.DbValidate @ Validated 32 migrations (execution time 00:00.038s)
2016-08-31 07:29:31,008 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:483)
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:391)
        at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1378)
        at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:653)
        at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:632)
        at org.dspace.core.Context.init(Context.java:145)
        at org.dspace.core.Context.<init>(Context.java:119)
        at org.dspace.storage.rdbms.DatabaseLegacyReindexer.reindex(DatabaseLegacyReindexer.java:52)
        at org.dspace.storage.rdbms.DatabaseLegacyReindexer.afterRepair(DatabaseLegacyReindexer.java:144)
        at org.flywaydb.core.internal.command.DbRepair$3.doInTransaction(DbRepair.java:114)
        at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
        at org.flywaydb.core.internal.command.DbRepair.repair(DbRepair.java:111)
        at org.flywaydb.core.Flyway$6.execute(Flyway.java:994)
        at org.flywaydb.core.Flyway$6.execute(Flyway.java:990)
        at org.flywaydb.core.Flyway.execute(Flyway.java:1171)
        at org.flywaydb.core.Flyway.repair(Flyway.java:990)
        at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:217)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)

Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration on the classpath has not been applied to database: 3.2.1.0
        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:472)
        ... 22 more
2016-08-31 07:29:31,012 ERROR org.dspace.storage.rdbms.DatabaseLegacyReindexer @ Error attempting to reindex all contents for search/browse. You may need to manually reindex Lucene or DBMS
java.lang.IllegalStateException: Flyway migration error occurred
        at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:658)

        at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:632)
        at org.dspace.core.Context.init(Context.java:145)
        at org.dspace.core.Context.<init>(Context.java:119)
        at org.dspace.storage.rdbms.DatabaseLegacyReindexer.reindex(DatabaseLegacyReindexer.java:52)
        at org.dspace.storage.rdbms.DatabaseLegacyReindexer.afterRepair(DatabaseLegacyReindexer.java:144)
        at org.flywaydb.core.internal.command.DbRepair$3.doInTransaction(DbRepair.java:114)
        at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
        at org.flywaydb.core.internal.command.DbRepair.repair(DbRepair.java:111)
        at org.flywaydb.core.Flyway$6.execute(Flyway.java:994)
        at org.flywaydb.core.Flyway$6.execute(Flyway.java:990)
        at org.flywaydb.core.Flyway.execute(Flyway.java:1171)
        at org.flywaydb.core.Flyway.repair(Flyway.java:990)
        at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:217)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: java.sql.SQLException: Flyway migration error occurred

        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:483)
        at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:391)
        at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1378)
        at org.dspace.storage.rdbms.DatabaseManager.getDataSource(DatabaseManager.java:653)
        ... 19 more

Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration on the classpath has not been applied to database: 3.2.1.0
        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:472)
        ... 22 more

Starting tomcat produces the same errors as previously, ending with:


Caused by: org.flywaydb.core.api.FlywayException: Validate failed. Found differences between applied migrations and available migrations: Migration on the classpath has not been applied to database: 3.2.1.0
    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:472)
    ... 25 more

Sean

To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscribe@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



--

Jordan Piščanc

unread,
Aug 31, 2016, 6:00:36 AM8/31/16
to DSpace Technical Support
I have same problem with the migration from DSpace5.1 to DSpace-CRIS5.3

I solved with:

bin/dspace database repair
bin/dspace database migrate ignored

Let us know if it works for you.

--
Jordan Piščanc
Institutional Repository IT Manager
University of Trieste - Italy
www.openstarts.units.it | arts.units.it | opendocuments.cro.it



Dne torek, 30. avgust 2016 14.34.58 UTC+2 je oseba Sean Carte napisala:

Sean Carte

unread,
Aug 31, 2016, 6:23:36 AM8/31/16
to Jordan Piščanc, DSpace Technical Support

On 31 August 2016 at 12:00, Jordan Piščanc <jordan....@gmail.com> wrote:
I have same problem with the migration from DSpace5.1 to DSpace-CRIS5.3

I solved with:

bin/dspace database repair
bin/dspace database migrate ignored

Let us know if it works for you.

Thanks, Jordan; unfortunately that only produces more errors:

dspace@dspace:~$ /dspace/bin/dspace database migrate ignored


Database URL: jdbc:postgresql://localhost:5432/dspace
Migrating database to latest version AND running previously "Ignored" migrations... (Check logs for details)
Caught exception:

java.sql.SQLException: Flyway migration error occurred
    at org.dspace.storage.rdbms.DatabaseUtils.updateDatabase(DatabaseUtils.java:483)
    at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:184)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
    at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Error executing statement at line 9: alter table cris_do_wpointer add column urlPath varchar(255)
    at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:91)
    at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:73)
    at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:287)
    at org.flywaydb.core.internal.command.DbMigrate$5.doInTransaction(DbMigrate.java:285)
    at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
    at org.flywaydb.core.internal.command.DbMigrate.applyMigration(DbMigrate.java:285)
    at org.flywaydb.core.internal.command.DbMigrate.access$800(DbMigrate.java:46)
    at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:207)
    at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:156)
    at org.flywaydb.core.internal.util.jdbc.TransactionTemplate.execute(TransactionTemplate.java:72)
    at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:156)
    at org.flywaydb.core.Flyway$1.execute(Flyway.java:864)

    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:472)
    ... 7 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "cris_do_wpointer" does not exist
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:366)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.flywaydb.core.internal.dbsupport.JdbcTemplate.executeStatement(JdbcTemplate.java:235)
    at org.flywaydb.core.internal.dbsupport.SqlScript.execute(SqlScript.java:89)
    ... 22 more


Sean
--

Jordan Piščanc

unread,
Aug 31, 2016, 7:03:31 AM8/31/16
to DSpace Technical Support

Did you restart "migrating" from a fresh db_restore of the DSpace5.5 db?

And than (without starting Tomcat) do the sequence:

bin/dspace database migrate
then check what was done with:  bin/dspace database info

and eventualy continue with:


bin/dspace database repair
bin/dspace database migrate ignored

--
Jordan


Dne sreda, 31. avgust 2016 12.23.36 UTC+2 je oseba Sean Carte napisala:

Luigi Andrea Pascarelli

unread,
Aug 31, 2016, 7:20:42 AM8/31/16
to Sean Carte, DSpace Technical Support

Dear Sean,

please can you share with us the output of "bin/dspace database info" command?

Your error does not make sense to me because the relation cris_do_wpointer should be built into V1.8.2.0 sql file.

With the command sent by Jordan we expect that all Ignored rows are now applyed into database so also the V1.8.2.0 file.

In any case there is a workaround. The workaround is apply manually this three sql:

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8.2.0__DSpaceCRIS-crismodule_database_schema.sql

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8.2.1__DSpaceCRIS-crispubmed_database_schema.sql

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/resources/org/dspace/storage/rdbms/sqlmigration/postgres/V1.8.2.2__DSpaceCRIS-subscription_database_schema.sql

And go on with:

bin/dspace database repair

bin/dspace database migrate ignored

Hope this helps.

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

-- 
Luigi Andrea Pascarelli

DSpace Committer and DSpace-CRIS Lead Developer

4Science,  www.4science.it (an Itway Group Company)

office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
tel: +39 333 934 1782
skype: l_a_p82
linkedin: luigiandreapascarelli

====================================
Salvate un albero. Non stampate questa mail se non necessario.
Save a tree. Don't print this e-mail unless it's really necessary.

DISCLAIMER: Le informazioni contenute in questo messaggio sono confidenziali, possono essere protette da leggi locali, 
e devono essere utilizzate esclusivamente dal destinatario.  La pubblicazione, l'utilizzo, la divulgazione, la stampa 
o la copia non autorizzata del contenuto della presente e-mail sono espressamente vietate e potenzialmente illegali. 
Nel caso si sia ricevuto il presente messaggio per errore, si prega di cancellarlo e di inviarne notifica al mittente.

DISCLAIMER: The information contained in this message is confidential, can be legally protected by local Laws, 
and must be exclusively used by the recipient. The publication, use, distribution, printing or unauthorized copy 
of the content of this message is strictly forbidden and it can be illegal. If you received this message by mistake, 
please destroy it and notify it to the sender.

Sean Carte

unread,
Aug 31, 2016, 9:06:12 AM8/31/16
to Jordan Piščanc, DSpace Technical Support
On 31 August 2016 at 13:03, Jordan Piščanc <jordan....@gmail.com> wrote:
Did you restart "migrating" from a fresh db_restore of the DSpace5.5 db?

I've restored from backup and am starting over:

...
BUILD SUCCESSFUL
Total time: 1 minute 24 seconds
dspace@dspace:~/DSpace-dspace-cris-5.5.0/dspace/target/dspace-installer$ cd
dspace@dspace:~$ /dspace/bin/dspace database info


Database URL: jdbc:postgresql://localhost:5432/dspace
Database Schema: public
Database Software: PostgreSQL version 9.5.4
Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901)

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     | PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     | PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     | PreInit |
| 1.3.9          | Drop constraint for DSpace |                     | PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     | PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     | PreInit |
| 1.5.9          | Drop constraint for DSpace |                     | PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     | PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     | PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     | PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     | PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     | PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     | PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-02-16 14:57:57 | Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-02-16 14:57:58 | Success |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-02-16 14:58:00 | Success |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up |                     | Pending |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
+----------------+----------------------------+---------------------+---------+
dspace@dspace:~$

And than (without starting Tomcat) do the sequence:

bin/dspace database migrate
then check what was done with:  bin/dspace database info
 dspace@dspace:~$ /dspace/bin/dspace database migrate

Database URL: jdbc:postgresql://localhost:5432/dspace
Migrating database to latest version... (Check logs for details)
Done.
dspace@dspace:~$ /dspace/bin/dspace database info


Database URL: jdbc:postgresql://localhost:5432/dspace
Database Schema: public
Database Software: PostgreSQL version 9.5.4
Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901)

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     | PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     | PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     | PreInit |
| 1.3.9          | Drop constraint for DSpace |                     | PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     | PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     | PreInit |
| 1.5.9          | Drop constraint for DSpace |                     | PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     | PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     | PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     | PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     | PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     | PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     | PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-02-16 14:57:57 | Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-02-16 14:57:58 | Success |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-02-16 14:58:00 | Success |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up |                     | Pending |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
+----------------+----------------------------+---------------------+---------+


and eventualy continue with:

bin/dspace database repair
bin/dspace database migrate ignored

dspace@dspace:~$ /dspace/bin/dspace database info


Database URL: jdbc:postgresql://localhost:5432/dspace
Database Schema: public
Database Software: PostgreSQL version 9.5.4
Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901)

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     | PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     | PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     | PreInit |
| 1.3.9          | Drop constraint for DSpace |                     | PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     | PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     | PreInit |
| 1.5.9          | Drop constraint for DSpace |                     | PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     | PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     | PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     | PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     | PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     | PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     | PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-02-16 14:57:57 | Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-02-16 14:57:58 | Success |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-02-16 14:57:59 | Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-02-16 14:58:00 | Success |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up |                     | Pending |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
+----------------+----------------------------+---------------------+---------+

Weird. I'll try Luigi's suggestions for manually applying the SQL.

Sean
--

Sean Carte

unread,
Aug 31, 2016, 9:29:41 AM8/31/16
to Luigi Andrea Pascarelli, DSpace Technical Support
Thank you, Andrea; that worked:


dspace@dspace:~$ /dspace/bin/dspace database info

Database URL: jdbc:postgresql://localhost:5432/dspace
Database Schema: public
Database Software: PostgreSQL version 9.5.4
Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901)

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     | PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     | PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     | PreInit |
| 1.3.9          | Drop constraint for DSpace |                     | PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     | PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     | PreInit |
| 1.5.9          | Drop constraint for DSpace |                     | PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     | PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     | PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     | PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     | PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     | PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     | PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-02-16 14:57:57 | Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | OutOrde |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-02-16 14:57:58 | OutOrde |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | OutOrde |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | OutOrde |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-02-16 14:57:59 | OutOrde |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-02-16 14:57:59 | OutOrde |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-02-16 14:58:00 | OutOrde |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | Success |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up | 2016-08-31 15:24:48 | Success |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | Success |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | Success |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | Success |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:48 | Success |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:49 | Success |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:49 | Success |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:49 | Success |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:49 | Success |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod | 2016-08-31 15:24:49 | Success |
+----------------+----------------------------+---------------------+---------+

Sean
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscribe@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.

-- 
Luigi Andrea Pascarelli

DSpace Committer and DSpace-CRIS Lead Developer

4Science,  www.4science.it (an Itway Group Company)

office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
tel: +39 333 934 1782
skype: l_a_p82
linkedin: luigiandreapascarelli

====================================
Salvate un albero. Non stampate questa mail se non necessario.
Save a tree. Don't print this e-mail unless it's really necessary.

DISCLAIMER: Le informazioni contenute in questo messaggio sono confidenziali, possono essere protette da leggi locali, 
e devono essere utilizzate esclusivamente dal destinatario.  La pubblicazione, l'utilizzo, la divulgazione, la stampa 
o la copia non autorizzata del contenuto della presente e-mail sono espressamente vietate e potenzialmente illegali. 
Nel caso si sia ricevuto il presente messaggio per errore, si prega di cancellarlo e di inviarne notifica al mittente.

DISCLAIMER: The information contained in this message is confidential, can be legally protected by local Laws, 
and must be exclusively used by the recipient. The publication, use, distribution, printing or unauthorized copy 
of the content of this message is strictly forbidden and it can be illegal. If you received this message by mistake, 
please destroy it and notify it to the sender.



--

helix84

unread,
Sep 2, 2016, 9:13:22 AM9/2/16
to Luigi Andrea Pascarelli, DSpace Technical Support
Hi Luigi,

I ran into the same problem trying to install DSpace-CRIS (the dspace-5_x_x-cris branch) on top of a DSpace 5.x database. The repair fixed the checksum issue. However, it seems that the auto-detection of which migrations were already present (PreInit) does not work correctly for the CRIS migrations - the 1.8.2.* migrations should be marked as Ignored, not PreInit.

+----------------+----------------------------+---------------------+---------+
| Version        | Description                | Installed on        | State   |
+----------------+----------------------------+---------------------+---------+
| 1.1            | Initial DSpace 1.1 databas |                     | PreInit |
| 1.2            | Upgrade to DSpace 1.2 sche |                     | PreInit |
| 1.3            | Upgrade to DSpace 1.3 sche |                     | PreInit |
| 1.3.9          | Drop constraint for DSpace |                     | PreInit |
| 1.4            | Upgrade to DSpace 1.4 sche |                     | PreInit |
| 1.5            | Upgrade to DSpace 1.5 sche |                     | PreInit |
| 1.5.9          | Drop constraint for DSpace |                     | PreInit |
| 1.6            | Upgrade to DSpace 1.6 sche |                     | PreInit |
| 1.7            | Upgrade to DSpace 1.7 sche |                     | PreInit |
| 1.8            | Upgrade to DSpace 1.8 sche |                     | PreInit |
| 1.8.2.0        | DSpaceCRIS-crismodule data |                     | PreInit |
| 1.8.2.1        | DSpaceCRIS-crispubmed data |                     | PreInit |
| 1.8.2.2        | DSpaceCRIS-subscription da |                     | PreInit |
| 3.0            | Initializing from DSpace 3 | 2015-11-09 15:50:40 | Success |
| 3.2.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.0            | Upgrade to DSpace 4.x sche | 2015-11-09 15:50:41 | Success |
| 4.1.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 4.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Ignored |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-11-09 15:50:44 | Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-11-09 15:50:45 | Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-11-09 15:50:45 | Success |
| 5.3.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.1        | FIX-SNAPSHOT-DSpaceCRIS-Up |                     | Pending |
| 5.3.0.2        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.3        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.4        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.5        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.0.6        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.3.1.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.4.0.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.5.0.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.5.1.0        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.5.1.1        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
| 5.5.1.2        | DSpaceCRIS-Upgrade-crismod |                     | Pending |
+----------------+----------------------------+---------------------+---------+

Manually importing the 1.8.2.* migrations and then resuming with "/dspace/bin/dspace database migrate ignored" seems to have succeeded.

The detection of 1.8.2.* migrations most likely needs to be fixed in DSpace-CRIS.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech+unsubscribe@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.
-- 
Luigi Andrea Pascarelli

DSpace Committer and DSpace-CRIS Lead Developer

4Science,  www.4science.it (an Itway Group Company)

office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
tel: +39 333 934 1782
skype: l_a_p82
linkedin: luigiandreapascarelli

====================================
Salvate un albero. Non stampate questa mail se non necessario.
Save a tree. Don't print this e-mail unless it's really necessary.

DISCLAIMER: Le informazioni contenute in questo messaggio sono confidenziali, possono essere protette da leggi locali, 
e devono essere utilizzate esclusivamente dal destinatario.  La pubblicazione, l'utilizzo, la divulgazione, la stampa 
o la copia non autorizzata del contenuto della presente e-mail sono espressamente vietate e potenzialmente illegali. 
Nel caso si sia ricevuto il presente messaggio per errore, si prega di cancellarlo e di inviarne notifica al mittente.

DISCLAIMER: The information contained in this message is confidential, can be legally protected by local Laws, 
and must be exclusively used by the recipient. The publication, use, distribution, printing or unauthorized copy 
of the content of this message is strictly forbidden and it can be illegal. If you received this message by mistake, 
please destroy it and notify it to the sender.

--
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+unsubscribe@googlegroups.com.

Luigi Andrea Pascarelli

unread,
Sep 2, 2016, 10:14:13 AM9/2/16
to hel...@centrum.sk, DSpace Technical Support

Dear Ivan,

thank you for the suggestion.

More in depth the issue comes out only for repository migrated from an old DSpace to DSpace 5.x and then to  DSpace-CRIS 5.x

Now the workaround works well but as soon as possible I will resolve this issue to manage this kind of upgrade.

Maybe the fix is simple. We can try to add to the DatabaseUtils at https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseUtils.java#L572 a check to detect the absence of the DSpace-CRIS schema on the pre-existent DSpace database. So I think, more or less, to use if cris_rpage == null then return check(DSpace <= 1.8). After this check the version returned should be the DSpace 1.8 or previous. Now with this kind of upgrade a "database repair" followed by the "database migrate ignored" should success without running manually the sql.

Thank you very much.

Regards,

Luigi Andrea

helix84

unread,
Sep 2, 2016, 10:24:41 AM9/2/16
to Luigi Andrea Pascarelli, DSpace Technical Support
Exactly what I had in mind with the detection. Thanks!

The checksum problem is just a little inconvenience - the "database repair" workaround should be mentioned on the DSpace-CRIS installation page. Per Tim's note it seems it will not be an issue anymore in DSpace 6.x / Flyway 4. Do you think it would be worth to upgrade to Flyway 4 in DSpace-CRIS 5.x? https://github.com/DSpace/DSpace/pull/1468


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Luigi Andrea Pascarelli

unread,
Sep 2, 2016, 11:57:07 AM9/2/16
to hel...@centrum.sk, DSpace Technical Support

Workaround now is mentioned to the DSpace-CRIS wiki Installation Page at https://wiki.duraspace.org/display/DSPACECRIS/Installation#Installation-UpgradeanexistentDSpaceinstallation

Thanks again.

Regards,

Luigi Andrea

Reply all
Reply to author
Forward
0 new messages