TDM Portal Error on Startup: SEVERE: Schema migration failed with exit code '4'.

book

Article ID: 142364

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

Upgraded from 4.8.113 to 4.8.149 in the following environments: QA, Test and Production.

After upgrading in Prod could not start TDM Portal.

Decided to completely uninstall the Portal and re-install, with same results.

Seeing below error in the startup.log file:

INFO|5072/5|19-12-20 11:48:14|SEVERE: Schema migration failed with exit code '4'.
INFO|5072/5|19-12-20 11:48:14|com.ca.tdm.tomcat.ProcessingException: Schema migration failed with exit code '4'.
INFO|5072/5|19-12-20 11:48:14| at com.ca.tdm.tomcat.Bootstrap.runSchemaMigrations(Bootstrap.java:87)
INFO|5072/5|19-12-20 11:48:14| at com.ca.tdm.tomcat.Bootstrap.run(Bootstrap.java:52)
INFO|5072/5|19-12-20 11:48:14| at com.ca.tdm.tomcat.Bootstrap.main(Bootstrap.java:40)
INFO|5072/5|19-12-20 11:48:14| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO|5072/5|19-12-20 11:48:14| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO|5072/5|19-12-20 11:48:14| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO|5072/5|19-12-20 11:48:14| at java.lang.reflect.Method.invoke(Method.java:498)
INFO|5072/5|19-12-20 11:48:14| at org.rzo.yajsw.app.WrapperJVMMain.executeMain(WrapperJVMMain.java:60)
INFO|5072/5|19-12-20 11:48:14| at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:43)

Seeing the below error in the TDMScemaManagementStartup.log:

2019-12-20 16:48:14.350 UTC [ERROR] ---                               c.ca.tdm.schema.Main:  Migration failed: 'FlywayException: Found non-empty schema(s) [dbo] without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.'
org.flywaydb.core.api.FlywayException: Found non-empty schema(s) [dbo] without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
 at org.flywaydb.core.Flyway$1.execute(Flyway.java:995)
 at org.flywaydb.core.Flyway$1.execute(Flyway.java:971)
 at org.flywaydb.core.Flyway.execute(Flyway.java:1464)
 at org.flywaydb.core.Flyway.migrate(Flyway.java:971)
 at com.ca.tdm.schema.SchemaMigrator.migrate(SchemaMigrator.java:90)
 ... 2 common frames omitted
Wrapped by: com.ca.tdm.schema.ProcessingException: Migration failed: 'FlywayException: Found non-empty schema(s) [dbo] without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.'
 at com.ca.tdm.schema.SchemaMigrator.migrate(SchemaMigrator.java:92)
 at com.ca.tdm.schema.Main.run(Main.java:92)
 at com.ca.tdm.schema.Main.main(Main.java:55)
2019-12-20 16:48:14.351 UTC [ERROR] ---                               c.ca.tdm.schema.Main:  Check log file C:\ProgramData\CA\CA Test Data Manager Portal\logs\TDMSchemaManagementStartup.log

Cause

The Production gtrep database was missing the below two tables and their indexes:

schema_version
schema_version_event 

 

Note: Not sure how these two tables were dropped from database.

Environment

Release : 4.8.149

Component : CA Test Data Manager

Resolution

Created manually the schema_version and schema_version_event tables and their indexes to the Prod gtrep database.

Used data from the two tables in one of the good environments to insert it the Prod tables.

Able to then start the CA TDM Portal with no errors.