Found non-empty schema "DRADIS" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.

book

Article ID: 195205

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

Receiving the following error for EnterpriseDashboard:

2020-07-13 20:49:27,308Z (16:49) [main] WARN  org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dradisInitBean': Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Found non-empty schema "DRADIS" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.

2020-07-13 20:49:27,337Z (16:49) [main] ERROR org.springframework.boot.SpringApplication - Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dradisInitBean': Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Found non-empty schema "DRADIS" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1634)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:84)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:393)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:380)
        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.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
        at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
        at dradis.Application.main(Application.groovy:31)
        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.install4j.runtime.launcher.UnixLauncher.main(Unknown Source)
Caused by: org.flywaydb.core.api.FlywayException: Found non-empty schema "DRADIS" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:948)
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:919)
        at org.flywaydb.core.Flyway.execute(Flyway.java:1320)
        at org.flywaydb.core.Flyway.migrate(Flyway.java:919)
        at org.flywaydb.core.Flyway$migrate$1.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at com.ca.dradis.db.FlywayDbMigration.migrateDatabase(FlywayDbMigration.groovy:116)
        at com.ca.dradis.db.FlywayDbMigration$migrateDatabase.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144)
        at dradis.DradisInitBean.migrateDatabase(DradisInitBean.groovy:77)
        at dradis.DradisInitBean.afterPropertiesSet(DradisInitBean.groovy:31)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1692)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)

        ... 34 more

2020-07-13 20:49:27,346Z (16:49) [main] ERROR dradis.Application             - Exception: Error creating bean with name 'dradisInitBean': Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Found non-empty schema "DRADIS" without metadata table! Use baseline() or set baselineOnMigrate to true to initialize the metadata table.

 

Cause

 

Corrupted schema.

Environment

Release : 10.5

Component : CA Service Virtualization

Resolution

The issue was resolved by the DBA team by recreating the schema with no tables and then letting the DB user create them when it logged in.

Additional Information

 

Let DevTest create all the tables.  In this case the Oracle account that is used needs to have DBA and create table privileges. The user that is configured in dradis.properties for Oracle access will need full DBA privileges in order to create the tables.

When the Enterprise Dashboard starts for the first time against the Oracle database without tables, it will automatically create the required tables. 

The character set must be Unicode. For the initial creation of the database, the Oracle user must have the CREATE VIEW system privilege. Oracle needs to be installed with UTF-8 encoding. UTF-8 is the only encoding we have tested and is the only encoding we support.