Hi,
I am working on using BroadSea Docker to install Atlas, and after starting the container, I am seeing the following issue in the log (schema “webapi” does not exist)
2021-04-28 20:29:06.253 INFO main org.flywaydb.core.internal.util.VersionPrinter - - Flyway 4.2.0 by Boxfuse
2021-04-28 20:29:06.679 INFO main org.flywaydb.core.internal.dbsupport.DbSupportFactory - - Database: jdbc:postgresql://host.docker.internal:5432/DockerOHDSI (PostgreSQL 13.2)
2021-04-28 20:29:06.925 INFO main org.flywaydb.core.internal.command.DbMigrate - - Current version of schema "WebAPI": << Empty Schema >>
2021-04-28 20:29:06.925 WARN main org.flywaydb.core.internal.command.DbMigrate - - outOfOrder mode is active. Migration of schema "WebAPI" may not be reproducible.
2021-04-28 20:29:06.945 INFO main org.flywaydb.core.internal.command.DbMigrate - - Migrating schema "WebAPI" to version 1.0.0.1 - schema-create spring batch
2021-04-28 20:29:06.955 ERROR main org.flywaydb.core.internal.command.DbMigrate - - Migration of schema "WebAPI" to version 1.0.0.1 - schema-create spring batch failed! Changes successfully rolled back.
2021-04-28 20:29:06.958 WARN main org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext - - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [org/ohdsi/webapi/ShiroConfiguration.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/ohdsi/webapi/FlywayConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException:
Migration V1.0.0.1__schema-create_spring_batch.sql failed
---------------------------------------------------------
SQL State : 3F000
Error Code : 0
Message : ERROR: schema "webapi" does not exist
Position: 14
Location : db/migration/postgresql/V1.0.0.1__schema-create_spring_batch.sql (/usr/local/tomcat/webapps/WebAPI/WEB-INF/classes/db/migration/postgresql/V1.0.0.1__schema-create_spring_batch.sql)
Line : 1
Statement : CREATE TABLE WebAPI.BATCH_JOB_INSTANCE (
JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY ,
VERSION BIGINT ,
JOB_NAME VARCHAR(100) NOT NULL,
JOB_KEY VARCHAR(32) NOT NULL,
constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY)
)
2021-04-28 20:29:06.971 INFO main org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer - -
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-04-28 20:29:06.978 ERROR main org.springframework.boot.SpringApplication - - Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'shiroFilter' defined in class path resource [org/ohdsi/webapi/ShiroConfiguration.class]: Unsatisfied dependency expressed through method 'shiroFilter' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flyway' defined in class path resource [org/ohdsi/webapi/FlywayConfig.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateSqlException:
Migration V1.0.0.1__schema-create_spring_batch.sql failed
and here is my database:
and as you can see, I do have the schema “WebAPI” there in the database… but notice that I don’t have any tables inside that schema, could that be the reason?
Really appreciate your help and look forward to some answer.
Thanks!