• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • 2.2 upgrade -> 4.0 executes db-os-changelog-pre-2.0-mysql.xml

    Copied our 2.2 database over to the 4.0 server. Fired up tomcat, but startup fails executing db-os-changelog-pre-2.0-mysql.xml trying to create tables that already exist.

    INFO 5/3/17 2:17 PM: liquibase: classpath:db/db-os-changelog-master-fresh.xml: db/db-os-pre-conditions.xml::Pre condition to check the storage engine::slakhani: ChangeSet db/db-os-pre-conditions.xml::Pre condition to check the storage engine::slakhani ran successfully in 2ms
    INFO 5/3/17 2:17 PM: liquibase: classpath:db/db-os-changelog-master-fresh.xml: db/db-os-pre-conditions.xml::Pre condition to check the case sensitivity::nmarwaha: ChangeSet db/db-os-pre-conditions.xml::Pre condition to check the case sensitivity::nmarwaha ran successfully in 1ms
    SEVERE 5/3/17 2:17 PM: liquibase: classpath:db/db-os-changelog-master-fresh.xml: db/db-os-changelog-pre-2.0-mysql.xml::1427110515738-2::OpenSpecimen: Change Set db/db-os-changelog-pre-2.0-mysql.xml::1427110515738-2::OpenSpecimen failed. Error: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘cat_stor_cont_spec_types’ already exists
    liquibase.exception.DatabaseException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘cat_stor_cont_spec_types’ already exists
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
    at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1227)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1210)
    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550)
    at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)
    at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73)
    at liquibase.Liquibase.update(Liquibase.java:200)
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:402)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:366)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1573)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1511)

    Hi @John_Reber

    It appears your database change log is missing some entries because of which you are seeing the errors. Can you please send us the output file (os_changelog.csv) generated by below command for review so that we can suggest corrective actions?

    mysql -u<username> -p <database-name> -e 'select * from databasechangelog order by dateexecuted' > os_changelog.csv
    

    Thanks

    Uploaded

    os_changelog.csv (103.1 KB)

    Hi @John_Reber

    Since you are using the database created by caTissue, you should be specifying the value “upgrade” (all lower case without quotes) for the deployment_type property at the time of build.

    deployment_type=upgrade
    

    Rebuild with above change, deploy, and restart OpenSpecimen.

    Thanks.

    OK, I thought since I was upgrading a current OS2.2 database I should use fresh. Will rerun using upgrade.

    Changed deployment_type to upgrade. Attached new os_changelog.csv and catalina.out. Failing at trying to drop foreign key.

    os_changelog.csv (103.4 KB)

    catalina.out (21.0 KB)