CA Application TestService VirtualizationCA Continuous Application Insight (PathFinder)CA Service Virtualization (DevTest / LISA / VSE / Application Test)
Issue/Introduction
When DevTest Registry is started, it fails with Schema upgrade failed error messages in registry.log. ------------------- 2019-05-06 20:34:05,118Z (15:34) [main] INFO System.out - [DevTest AGENT:][INFO][1996][13][main][May 6, 2019 3:34:05 PM] Checking DevTest Agent schema 2019-05-06 20:34:05,149Z (15:34) [main] ERROR System.err - [DevTest AGENT:][ERROR][1996][13][main][May 6, 2019 3:34:05 PM] !!!!!!!! Database upgrade in progress or failed !!!!!!!! 2019-05-06 20:34:06,228Z (15:34) [main] ERROR System.err - [DevTest AGENT:][ERROR][1996][13][main][May 6, 2019 3:34:06 PM] Schema upgrade failed: java.sql.SQLException 2019-05-06 20:34:07,275Z (15:34) [main] ERROR System.err - [DevTest AGENT:][ERROR][1996][13][main][May 6, 2019 3:34:07 PM] DB error... No transactions will be saved there 2019-05-06 20:34:08,306Z (15:34) [main] ERROR com.itko.lisa.coordinator.TestRegistryImpl - Schema upgrade failed java.sql.SQLException: Schema upgrade failed at com.itko.lisa.remote.persist.SchemaPersister.createOrUpgradeSchemaIfNeeded(SchemaPersister.java:949) at com.itko.lisa.remote.persist.PersistManager.createSchemaIfNeeded(PersistManager.java:383) at com.itko.lisa.remote.persist.PersistManager.getSafeConnection(PersistManager.java:592) at com.itko.lisa.coordinator.TestRegistryImpl.main(TestRegistryImpl.java:2194) 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 com.exe4j.runtime.LauncherEngine.launch(Unknown Source) at com.exe4j.runtime.WinLauncher$2.run(Unknown Source)
Cause
When DevTest is upgraded to a new version and used the same DB but for some reason when the components were started with earlier version of DevTest causes the Schema upgrade issues.
Environment
All Supported DevTest Environments.
Resolution
Once migrated to the new version, the schema is changed to new version of DevTest and no earlier releases of DevTest can be started to go against that database again. This is by design.
Need to drop all of the DevTest tables on the DB and have them created again. Once the tables are dropped, start the Registry again and all of the tables will get re-created.