Upgrade CDD 6.5 to 6.7 generates a 404

Document ID : KB000096139
Last Modified Date : 16/05/2018
Show Technical Document Details
Introduction:
Trying to upgrade CDD to 6.7 and getting error post upgrade.

 
Question:
Upgrading from version 6.5 to 6.7 of CDD, we are getting below error

UI Error: When trying to view http://CDD-HOSTNAME:8080/cdd it throws 404 Error

Logs error:  
2018-05-15 16:14:55.836 [localhost-startStop-1] INFO  o.f.core.internal.command.DbMigrate - Current version of schema `cdd`: 6.7.0.0.20171226144409
2018-05-15 16:14:55.842 [localhost-startStop-1] ERROR c.c.r.t.i.TenantSchemaUpgradeHandler - Failed to upgrade tenant-schema for 'cdd'.
org.flywaydb.core.api.FlywayException: Schema `cdd` contains a failed migration to version 6.7.0.0.20171226144409 !

                at org.flywaydb.core.internal.command.DbMigrate$2.doInTransaction(DbMigrate.java:196)
Environment:
On Premise
  • OS Details: Centos 6.6
  • Tomcat: 8.0.33
    • JDK 1.8.0_91
Answer:
The error you’ve received during migration/upgrade was during the execution of script V6.7.0.0.20171226144409__add_creation_date_to_test_source.sql file, relates to this missing flag.
SQL State  : 42000
Error Code : 1067
Message    : Invalid default value for 'creation_date'
Location   : sql/tenant/mysql/V6.7.0.0.20171226144409__add_creation_date_to_test_source.sql (/opt/tomcat8/webapps/cdd/WEB-INF/classes/sql/tenant/mysql/V6.7.0.0.20171226144409__add_creation_date_to_test_source.sql)
Line       : 1
Statement  : ALTER TABLE test_source ADD creation_date datetime DEFAULT CURRENT_TIMESTAMP NOT NULL

As per the system requirement you need to create a MySQL flags for Windows and Linux installation. Please follow instruction below.

Resolution steps:
1: Stop Tomcat
2: Move all logs from <tomcat-home>/logs and <user-home>/.cdd/logs to another location (for further investigation)
3: Set the MySQL flag by running below query as MySQL admin user
Set global sql_mode = ‘STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;
4: Start Tomcat

 
Additional Information: