Flyway error in 2.33.3-SNAPSHOT on using 2.32 database (on second startup, the server started fine on first attempt))

Error Log
------------------------------------------------------------------------------------------------------------------------------------
* WARN 2020-03-23 22:46:37,825 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.hisp.dhis.minmax.MinMaxDataElementStore' defined in URL [jar:file:/Users/gaurav/Documents/Gaurav/Work/Source/blackbird/clean/dish2/dhis-2/dhis-web/dhis-web-portal/target/dhis/WEB-INF/lib/dhis-service-validation-2.33.3-SNAPSHOT.jar!/org/hisp/dhis/minmax/hibernate/HibernateMinMaxDataElementStore.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in org.hisp.dhis.db.migration.config.FlywayConfig: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24 (AbstractApplicationContext.java [main])

* ERROR 2020-03-23 22:46:37,832 Context initialization failed (ContextLoader.java [main])

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.hisp.dhis.minmax.MinMaxDataElementStore' defined in URL [jar:file:/Users/gaurav/Documents/Gaurav/Work/Source/blackbird/clean/dish2/dhis-2/dhis-web/dhis-web-portal/target/dhis/WEB-INF/lib/dhis-service-validation-2.33.3-SNAPSHOT.jar!/org/hisp/dhis/minmax/hibernate/HibernateMinMaxDataElementStore.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in org.hisp.dhis.db.migration.config.FlywayConfig: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)

at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1341)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)

at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:843)

at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:533)

at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:816)

at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:345)

at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1404)

at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:323)

at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1366)

at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)

at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)

at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:520)

at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:398)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)

at org.eclipse.jetty.server.Server.start(Server.java:411)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

at org.eclipse.jetty.server.Server.doStart(Server.java:378)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:460)

at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:328)

at org.eclipse.jetty.maven.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:64)

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)

at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)

at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)

at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)

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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in org.hisp.dhis.db.migration.config.FlywayConfig: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:307)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171)

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)

... 67 more

Caused by: org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24

at org.flywaydb.core.Flyway.doValidate(Flyway.java:268)

at org.flywaydb.core.Flyway.access$100(Flyway.java:77)

at org.flywaydb.core.Flyway$1.execute(Flyway.java:150)

at org.flywaydb.core.Flyway$1.execute(Flyway.java:142)

at org.flywaydb.core.Flyway.execute(Flyway.java:504)

at org.flywaydb.core.Flyway.migrate(Flyway.java:142)

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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1904)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1846)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)

... 80 more

[ **WARNING** ] Failed startup of context o.e.j.m.p.JettyWebAppContext@1883871b{/,file:///Users/gaurav/Documents/Gaurav/Work/Source/blackbird/clean/dish2/dhis-2/dhis-web/dhis-web-portal/target/dhis/,UNAVAILABLE}{/Users/gaurav/Documents/Gaurav/Work/Source/blackbird/clean/dish2/dhis-2/dhis-web/dhis-web-portal/target/dhis.war}

**org.springframework.beans.factory.UnsatisfiedDependencyException** : **Error creating bean with name 'org.hisp.dhis.minmax.MinMaxDataElementStore' defined in URL [jar:file:/Users/gaurav/Documents/Gaurav/Work/Source/blackbird/clean/dish2/dhis-2/dhis-web/dhis-web-portal/target/dhis/WEB-INF/lib/dhis-service-validation-2.33.3-SNAPSHOT.jar!/org/hisp/dhis/minmax/hibernate/HibernateMinMaxDataElementStore.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in org.hisp.dhis.db.migration.config.FlywayConfig: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24**

**at** org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray ( **ConstructorResolver.java:769** )

**at** org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor ( **ConstructorResolver.java:218** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor ( **AbstractAutowireCapableBeanFactory.java:1341** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance ( **AbstractAutowireCapableBeanFactory.java:1187** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( **AbstractAutowireCapableBeanFactory.java:555** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( **AbstractAutowireCapableBeanFactory.java:515** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 ( **AbstractBeanFactory.java:320** )

**at** org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( **DefaultSingletonBeanRegistry.java:222** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean ( **AbstractBeanFactory.java:318** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( **AbstractBeanFactory.java:199** )

**at** org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( **DefaultListableBeanFactory.java:845** )

**at** org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( **AbstractApplicationContext.java:877** )

**at** org.springframework.context.support.AbstractApplicationContext.refresh ( **AbstractApplicationContext.java:549** )

**at** org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext ( **ContextLoader.java:400** )

**at** org.springframework.web.context.ContextLoader.initWebApplicationContext ( **ContextLoader.java:291** )

**at** org.springframework.web.context.ContextLoaderListener.contextInitialized ( **ContextLoaderListener.java:103** )

**at** org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized ( **ContextHandler.java:843** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized ( **ServletContextHandler.java:533** )

**at** org.eclipse.jetty.server.handler.ContextHandler.startContext ( **ContextHandler.java:816** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.startContext ( **ServletContextHandler.java:345** )

**at** org.eclipse.jetty.webapp.WebAppContext.startWebapp ( **WebAppContext.java:1404** )

**at** org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp ( **JettyWebAppContext.java:323** )

**at** org.eclipse.jetty.webapp.WebAppContext.startContext ( **WebAppContext.java:1366** )

**at** org.eclipse.jetty.server.handler.ContextHandler.doStart ( **ContextHandler.java:778** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.doStart ( **ServletContextHandler.java:262** )

**at** org.eclipse.jetty.webapp.WebAppContext.doStart ( **WebAppContext.java:520** )

**at** org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart ( **JettyWebAppContext.java:398** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:113** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart ( **ContextHandlerCollection.java:161** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:113** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.server.Server.start ( **Server.java:411** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:105** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.server.Server.doStart ( **Server.java:378** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty ( **AbstractJettyMojo.java:460** )

**at** org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute ( **AbstractJettyMojo.java:328** )

**at** org.eclipse.jetty.maven.plugin.JettyRunWarMojo.execute ( **JettyRunWarMojo.java:64** )

**at** org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ( **DefaultBuildPluginManager.java:137** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:210** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:156** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:148** )

**at** org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ( **LifecycleModuleBuilder.java:117** )

**at** org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ( **LifecycleModuleBuilder.java:81** )

**at** org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ( **SingleThreadedBuilder.java:56** )

**at** org.apache.maven.lifecycle.internal.LifecycleStarter.execute ( **LifecycleStarter.java:128** )

**at** org.apache.maven.DefaultMaven.doExecute ( **DefaultMaven.java:305** )

**at** org.apache.maven.DefaultMaven.doExecute ( **DefaultMaven.java:192** )

**at** org.apache.maven.DefaultMaven.execute ( **DefaultMaven.java:105** )

**at** org.apache.maven.cli.MavenCli.execute ( **MavenCli.java:956** )

**at** org.apache.maven.cli.MavenCli.doMain ( **MavenCli.java:288** )

**at** org.apache.maven.cli.MavenCli.main ( **MavenCli.java:192** )

**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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ( **Launcher.java:282** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.launch ( **Launcher.java:225** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ( **Launcher.java:406** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.main ( **Launcher.java:347** )

**Caused by** : org.springframework.beans.factory.BeanCreationException: **Error creating bean with name 'flyway' defined in org.hisp.dhis.db.migration.config.FlywayConfig: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Validate failed: Detected resolved migration not applied to database: 2.32.24**

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( **AbstractAutowireCapableBeanFactory.java:1778** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( **AbstractAutowireCapableBeanFactory.java:593** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( **AbstractAutowireCapableBeanFactory.java:515** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 ( **AbstractBeanFactory.java:320** )

**at** org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( **DefaultSingletonBeanRegistry.java:222** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean ( **AbstractBeanFactory.java:318** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( **AbstractBeanFactory.java:199** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean ( **AbstractBeanFactory.java:307** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( **AbstractBeanFactory.java:199** )

**at** org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate ( **DependencyDescriptor.java:277** )

**at** org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency ( **DefaultListableBeanFactory.java:1251** )

**at** org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency ( **DefaultListableBeanFactory.java:1171** )

**at** org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument ( **ConstructorResolver.java:857** )

**at** org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray ( **ConstructorResolver.java:760** )

**at** org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor ( **ConstructorResolver.java:218** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor ( **AbstractAutowireCapableBeanFactory.java:1341** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance ( **AbstractAutowireCapableBeanFactory.java:1187** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( **AbstractAutowireCapableBeanFactory.java:555** )

**at** org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( **AbstractAutowireCapableBeanFactory.java:515** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 ( **AbstractBeanFactory.java:320** )

**at** org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( **DefaultSingletonBeanRegistry.java:222** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean ( **AbstractBeanFactory.java:318** )

**at** org.springframework.beans.factory.support.AbstractBeanFactory.getBean ( **AbstractBeanFactory.java:199** )

**at** org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( **DefaultListableBeanFactory.java:845** )

**at** org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( **AbstractApplicationContext.java:877** )

**at** org.springframework.context.support.AbstractApplicationContext.refresh ( **AbstractApplicationContext.java:549** )

**at** org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext ( **ContextLoader.java:400** )

**at** org.springframework.web.context.ContextLoader.initWebApplicationContext ( **ContextLoader.java:291** )

**at** org.springframework.web.context.ContextLoaderListener.contextInitialized ( **ContextLoaderListener.java:103** )

**at** org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized ( **ContextHandler.java:843** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized ( **ServletContextHandler.java:533** )

**at** org.eclipse.jetty.server.handler.ContextHandler.startContext ( **ContextHandler.java:816** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.startContext ( **ServletContextHandler.java:345** )

**at** org.eclipse.jetty.webapp.WebAppContext.startWebapp ( **WebAppContext.java:1404** )

**at** org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp ( **JettyWebAppContext.java:323** )

**at** org.eclipse.jetty.webapp.WebAppContext.startContext ( **WebAppContext.java:1366** )

**at** org.eclipse.jetty.server.handler.ContextHandler.doStart ( **ContextHandler.java:778** )

**at** org.eclipse.jetty.servlet.ServletContextHandler.doStart ( **ServletContextHandler.java:262** )

**at** org.eclipse.jetty.webapp.WebAppContext.doStart ( **WebAppContext.java:520** )

**at** org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart ( **JettyWebAppContext.java:398** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:113** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart ( **ContextHandlerCollection.java:161** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:113** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.start ( **ContainerLifeCycle.java:131** )

**at** org.eclipse.jetty.server.Server.start ( **Server.java:411** )

**at** org.eclipse.jetty.util.component.ContainerLifeCycle.doStart ( **ContainerLifeCycle.java:105** )

**at** org.eclipse.jetty.server.handler.AbstractHandler.doStart ( **AbstractHandler.java:61** )

**at** org.eclipse.jetty.server.Server.doStart ( **Server.java:378** )

**at** org.eclipse.jetty.util.component.AbstractLifeCycle.start ( **AbstractLifeCycle.java:68** )

**at** org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty ( **AbstractJettyMojo.java:460** )

**at** org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute ( **AbstractJettyMojo.java:328** )

**at** org.eclipse.jetty.maven.plugin.JettyRunWarMojo.execute ( **JettyRunWarMojo.java:64** )

**at** org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo ( **DefaultBuildPluginManager.java:137** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:210** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:156** )

**at** org.apache.maven.lifecycle.internal.MojoExecutor.execute ( **MojoExecutor.java:148** )

**at** org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ( **LifecycleModuleBuilder.java:117** )

**at** org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject ( **LifecycleModuleBuilder.java:81** )

**at** org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build ( **SingleThreadedBuilder.java:56** )

**at** org.apache.maven.lifecycle.internal.LifecycleStarter.execute ( **LifecycleStarter.java:128** )

**at** org.apache.maven.DefaultMaven.doExecute ( **DefaultMaven.java:305** )

**at** org.apache.maven.DefaultMaven.doExecute ( **DefaultMaven.java:192** )

**at** org.apache.maven.DefaultMaven.execute ( **DefaultMaven.java:105** )

**at** org.apache.maven.cli.MavenCli.execute ( **MavenCli.java:956** )

**at** org.apache.maven.cli.MavenCli.doMain ( **MavenCli.java:288** )

**at** org.apache.maven.cli.MavenCli.main ( **MavenCli.java:192** )

**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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced ( **Launcher.java:282** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.launch ( **Launcher.java:225** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode ( **Launcher.java:406** )

**at** org.codehaus.plexus.classworlds.launcher.Launcher.main ( **Launcher.java:347** )

**Caused by** : org.flywaydb.core.api.FlywayException: **Validate failed: Detected resolved migration not applied to database: 2.32.24**
---------------------------------------------------

This upgrade is part of our organizations covid response. A quick resolution will be much appreciated & help us fight this crisis.

Hi @Gaurav_Kumar. This looks like a local build issue. 2.33-SNAPSHOT does not have 2.32.24 script. But your local build is picking up the wrong class files. Maybe an inconsistency when starting up the application in jetty server.

Will you be able to deploy the correct 2.33-SNAPSHOT war onto a tomcat server using the same db and see if the problem persists.

Also please share the result of the following sql from the db

Select * from flyway_schema_history order by installed_rank desc
1 Like

Results from the query:

68 2.33.24 Update completedatasetregistration lastupdatedby SQL 2.33/V2_33_24__Update_completedatasetregistration_lastupdatedby.sql -254179127 gaurav 2020-03-23 20:09:18.657926 56 t
67 2.33.23 Add translations column into systemsetting table SQL 2.33/V2_33_23__Add_translations_column_into_systemsetting_table.sql 932924626 gaurav 2020-03-23 20:09:18.650041 1 t
66 2.33.22 Convert push analysis job parameters into list of string JDBC org.hisp.dhis.db.migration.v33.V2_33_22__Convert_push_analysis_job_parameters_into_list_of_string gaurav 2020-03-23 20:09:18.645134 1 t
65 2.33.21 Set embedded expressions nullable and unique SQL 2.33/V2_33_21__Set_embedded_expressions_nullable_and_unique.sql 1515537010 gaurav 2020-03-23 20:09:18.63082 7 t
64 2.33.20 RemoveOrphanProgramStageInstances SQL 2.33/V2_33_20__RemoveOrphanProgramStageInstances.sql -801139725 gaurav 2020-03-23 20:09:18.618545 5 t
63 2.33.19 Drop trackedentitydatavalue table SQL 2.33/V2_33_19__Drop_trackedentitydatavalue_table.sql 1765234989 gaurav 2020-03-23 20:09:18.047299 1 t
62 2.33.17 Introduce nextscheduledate for programstage SQL 2.33/V2_33_17__Introduce_nextscheduledate_for_programstage.sql 2003578911 gaurav 2020-03-23 20:09:18.040641 3 t
61 2.33.16 Mirgrate data to jsonb attributevalues columns SQL 2.33/V2_33_16__Mirgrate_data_to_jsonb_attributevalues_columns.sql -659978644 gaurav 2020-03-23 20:09:15.329468 2704 t
60 2.33.15 Add jsonb attributevalues columns SQL 2.33/V2_33_15__Add_jsonb_attributevalues_columns.sql 366047253 gaurav 2020-03-23 20:09:15.290516 21 t
59 2.33.14 Add translations for dataset section SQL 2.33/V2_33_14__Add_translations_for_dataset_section.sql -1792497106 gaurav 2020-03-23 20:09:15.276556 3 t
58 2.33.13 Migrate text based system settings to use enums JDBC org.hisp.dhis.db.migration.v33.V2_33_13__Migrate_text_based_system_settings_to_use_enums gaurav 2020-03-23 20:09:15.089122 183 t
57 2.33.12 Add renderingstrategy to mapview SQL 2.33/V2_33_12__Add_renderingstrategy_to_mapview.sql 15230967 gaurav 2020-03-23 20:09:15.079594 6 t
56 2.33.11 Add programstageid to trackedentitydataelementdimension SQL 2.33/V2_33_11__Add_programstageid_to_trackedentitydataelementdimension.sql 1728506538 gaurav 2020-03-23 20:09:15.070268 2 t
55 2.33.10 Add hasMultiple flag in FileResource SQL 2.33/V2_33_10__Add_hasMultiple_flag_in_FileResource.sql -814072746 gaurav 2020-03-23 20:09:15.060758 4 t
54 2.33.9 CategoryOption formname field SQL 2.33/V2_33_9__CategoryOption_formname_field.sql -517958816 gaurav 2020-03-23 20:09:15.053348 1 t
53 2.33.8 Drop tracked entity attribute program scope SQL 2.33/V2_33_8__Drop_tracked_entity_attribute_program_scope.sql 1868872398 gaurav 2020-03-23 20:09:15.044326 0 t
52 2.33.7 Set psde data element not null SQL 2.33/V2_33_7__Set_psde_data_element_not_null.sql -158490623 gaurav 2020-03-23 20:09:15.034604 3 t
51 2.33.6 Set ptea attribute not null SQL 2.33/V2_33_6__Set_ptea_attribute_not_null.sql 672673546 gaurav 2020-03-23 20:09:15.023755 2 t
50 2.33.5 Update job parameters with system setting values JDBC org.hisp.dhis.db.migration.v33.V2_33_5__Update_job_parameters_with_system_setting_values gaurav 2020-03-23 20:09:14.992631 14 t
49 2.33.4 Create categories categoryoptions index backport SQL 2.33/V2_33_4__Create_categories_categoryoptions_index_backport.sql 722573432 gaurav 2020-03-23 20:09:14.984031 0 t
48 2.33.3 Create cateogires categoryoptions index SQL 2.33/V2_33_3__Create_cateogires_categoryoptions_index.sql 1407320962 gaurav 2020-03-23 20:09:14.972229 6 t
47 2.33.2 Substitute job configurations with program data sync job type with new job configurations SQL 2.33/V2_33_2__Substitute_job_configurations_with_program_data_sync_job_type_with_new_job_configurations.sql -2120783418 gaurav 2020-03-23 20:09:14.953535 12 t
46 2.33.1 Job configuration job type column to varchar JDBC org.hisp.dhis.db.migration.v33.V2_33_1__Job_configuration_job_type_column_to_varchar gaurav 2020-03-23 20:09:14.805757 131 t
45 2.32.23 Migrate gauge charts new format SQL 2.32/V2_32_23__Migrate_gauge_charts_new_format.sql -1159638519 gaurav 2020-03-23 20:09:14.797396 2 t
44 2.32.22 Migrate pie charts new format SQL 2.32/V2_32_22__Migrate_pie_charts_new_format.sql 694570142 gaurav 2020-03-23 20:09:14.76538 27 t
43 2.32.21 Create categories categoryoptions index SQL 2.32/V2_32_21__Create_categories_categoryoptions_index.sql -127279840 gaurav 2020-03-23 20:09:14.739709 4 t
42 2.32.20 Create populate mapview filter dimension tables SQL 2.32/V2_32_20__Create_populate_mapview_filter_dimension_tables.sql 1822920300 gaurav 2020-03-23 20:09:14.709443 20 t
41 2.32.19 Create programstageinstancefilter table SQL 2.32/V2_32_19__Create_programstageinstancefilter_table.sql -1655494731 gaurav 2020-03-23 20:09:14.685798 15 t
40 2.32.18 PotentialDuplicate table SQL 2.32/V2_32_18__PotentialDuplicate_table.sql -1711695320 gaurav 2020-03-23 20:09:14.664197 9 t
39 2.32.17 Separate sequence generators for highly used tables SQL 2.32/V2_32_17__Separate_sequence_generators_for_highly_used_tables.sql -590911677 gaurav 2020-03-23 20:09:14.608795 48 t
38 2.32.16 Assign Job Configuration UID SQL 2.32/V2_32_16__Assign_Job_Configuration_UID.sql 1847518055 gaurav 2020-03-23 20:09:14.595161 6 t
37 2.32.15 Add chart series SQL 2.32/V2_32_15__Add_chart_series.sql -1373861876 gaurav 2020-03-23 20:09:14.563542 24 t
36 2.32.14 Update relationshiptype bidirectional SQL 2.32/V2_32_14__Update_relationshiptype_bidirectional.sql -9899667 gaurav 2020-03-23 20:09:14.538757 12 t
35 2.32.13 Add UserAssignment for Events SQL 2.32/V2_32_13__Add_UserAssignment_for_Events.sql -1769784669 gaurav 2020-03-23 20:09:10.047568 4392 t
34 2.32.12 Copy timestamp values into lastupdated field SQL 2.32/V2_32_12__Copy_timestamp_values_into_lastupdated_field.sql -1999611754 gaurav 2020-03-23 20:09:09.93705 91 t
33 2.32.11 Remove TEI representative SQL 2.32/V2_32_11__Remove_TEI_representative.sql 1168727321 gaurav 2020-03-23 20:09:09.902208 15 t
32 2.32.10 Use bigint for id columns SQL 2.32/V2_32_10__Use_bigint_for_id_columns.sql 1959122901 gaurav 2020-03-23 19:59:06.140955 599898 t
31 2.32.9 OrgUnitGroup geometry field SQL 2.32/V2_32_9__OrgUnitGroup_geometry_field.sql 135519777 gaurav 2020-03-23 19:59:05.964999 5 t
30 2.32.8 OrgUnit geometry field SQL 2.32/V2_32_8__OrgUnit_geometry_field.sql 2141862134 gaurav 2020-03-23 19:59:04.000069 1923 t
29 2.32.7 Introduce jsonb eventdatavalues column SQL 2.32/V2_32_7__Introduce_jsonb_eventdatavalues_column.sql -161817378 gaurav 2020-03-23 19:13:30.146809 2733451 t
28 2.32.6 Remove program approval workflow SQL 2.32/V2_32_6__Remove_program_approval_workflow.sql -665392634 gaurav 2020-03-21 16:17:52.239693 7 t
27 2.32.5 Remove program shortname constraint SQL 2.32/V2_32_5__Remove_program_shortname_constraint.sql 623557658 gaurav 2020-03-21 16:17:52.075109 17 t
26 2.32.4 Remove KafkaJob SQL 2.32/V2_32_4__Remove_KafkaJob.sql 448507296 gaurav 2020-03-21 16:17:52.058547 11 t
25 2.32.3 Program rule variable option code SQL 2.32/V2_32_3__Program_rule_variable_option_code.sql 1675218695 gaurav 2020-03-21 16:17:52.037639 16 t
24 2.32.2 Complete data set registration fields SQL 2.32/V2_32_2__Complete_data_set_registration_fields.sql -1660385962 gaurav 2020-03-21 16:17:51.902412 126 t
23 2.32.1 Org unit fields SQL 2.32/V2_32_1__Org_unit_fields.sql -1792150736 gaurav 2020-03-21 16:17:51.868292 25 t
22 2.31.21 Clean attribute values SQL 2.31/V2_31_21__Clean_attribute_values.sql -1742777484 gaurav 2020-02-23 20:15:50.854563 6550 t
21 2.31.20 Add translations column into systemsetting table SQL 2.31/V2_31_20__Add_translations_column_into_systemsetting_table.sql 932924626 gaurav 2020-02-23 20:15:50.854563 2 t
20 2.31.19 Convert push analysis job parameters into list of string JDBC org.hisp.dhis.db.migration.v31.V2_31_19__Convert_push_analysis_job_parameters_into_list_of_string gaurav 2020-02-23 20:15:50.854563 2 t
19 2.31.18 Set embedded expressions nullable and unique SQL 2.31/V2_31_18__Set_embedded_expressions_nullable_and_unique.sql 1515537010 gaurav 2020-02-23 20:15:50.854563 16 t
18 2.31.16 Remove unused columns from attribute values SQL 2.31/V2_31_16__Remove_unused_columns_from_attribute_values.sql -631348205 gaurav 2020-02-23 20:15:50.854563 2 t
17 2.31.15 RemoveOrphanProgramStageInstances SQL 2.31/V2_31_15__RemoveOrphanProgramStageInstances.sql -801139725 gaurav 2020-02-23 20:15:50.854563 5 t
16 2.31.14 Add translations for dataSet section SQL 2.31/V2_31_14__Add_translations_for_dataSet_section.sql 892332576 gaurav 2020-02-23 20:15:50.854563 2 t
15 2.31.13 Create categories categoryoptions index SQL 2.31/V2_31_13__Create_categories_categoryoptions_index.sql -127279840 gaurav 2020-02-23 20:15:50.854563 5 t
14 2.31.12 Assign Job Configuration UID SQL 2.31/V2_31_12__Assign_Job_Configuration_UID.sql 953261615 gaurav 2020-02-23 20:15:50.854563 8 t
13 2.31.11 Copy timestamp value into lastupdated field SQL 2.31/V2_31_11__Copy_timestamp_value_into_lastupdated_field.sql 2027155037 gaurav 2020-02-23 20:15:50.854563 6 t
12 2.31.10 Remove storagestatus column from fileresource table SQL 2.31/V2_31_10__Remove_storagestatus_column_from_fileresource_table.sql -1096225816 gaurav 2020-02-23 20:15:50.854563 1 t
11 2.31.9 Add user permissions for new data viz app JDBC org.hisp.dhis.db.migration.v31.V2_31_9__Add_user_permissions_for_new_data_viz_app gaurav 2020-02-23 20:15:50.854563 25 t
10 2.31.8 Program rule variable option code SQL 2.31/V2_31_8__Program_rule_variable_option_code.sql 1675218695 gaurav 2020-02-23 20:15:50.854563 3 t
9 2.31.7 Delete code klass unique constraint in deleted object SQL 2.31/V2_31_7__Delete_code_klass_unique_constraint_in_deleted_object.sql 1445061512 gaurav 2020-02-23 20:15:50.854563 1 t
8 2.31.6 Update default program access level to OPEN SQL 2.31/V2_31_6__Update_default_program_access_level_to_OPEN.sql 389837453 gaurav 2020-02-23 20:15:50.854563 2 t
7 2.31.5 Add new user role for new capture app JDBC org.hisp.dhis.db.migration.v31.V2_31_5__Add_new_user_role_for_new_capture_app gaurav 2020-02-23 20:15:50.854563 35 t
6 2.31.4 Add defaults for validationstrategy JDBC org.hisp.dhis.db.migration.v31.V2_31_4__Add_defaults_for_validationstrategy gaurav 2020-02-23 20:15:50.854563 25 t
5 2.31.3 Program notification template to templateid JDBC org.hisp.dhis.db.migration.v31.V2_31_3__Program_notification_template_to_templateid gaurav 2020-02-23 20:15:50.854563 7 t
4 2.31.2 Job configuration param to jsonb JDBC org.hisp.dhis.db.migration.v31.V2_31_2__Job_configuration_param_to_jsonb gaurav 2020-02-23 20:15:50.854563 365 t
3 2.31.1 Migrations for release v31 SQL 2.31/V2_31_1__Migrations_for_release_v31.sql -271885416 gaurav 2020-02-23 20:15:50.854563 2962 t
2 2.30.0 Populate dhis2 schema if empty database JDBC org.hisp.dhis.db.migration.base.V2_30_0__Populate_dhis2_schema_if_empty_database gaurav 2020-02-23 20:15:50.854563 8 t
1 1 << Flyway Baseline >> BASELINE << Flyway Baseline >> null 2020-02-23 20:15:50.644241 0 t

Hi @Ameen. Can you also please advise the proper procedure to prep 2.28 DB for 2.33. We want to be very sure.

Thanks.

@Gaurav_Kumar From 2.28 you need to follow upgrade guidelines into 2.29 and 2.30 step by step. Once you are in 2.30, you can directly deploy 2.33 war file which will handle the upgrade until 2.33 in one go.