Jobrunr throwing flyway error when dockerizing application

125 Views Asked by At

I am using jobrunr-spring-boot-starter:5.0.1 with my spring boot application. I run my migrations using flyway. When not running inside docker, everything is working as expected. However, while running using docker, I am facing the following error:

ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'recurringJobPostProcessor' defined in class path resource [org/jobrunr/spring/autoconfigure/JobRunrAutoConfiguration.class]: Unsatisfied dependency expressed through method 'recurringJobPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jobScheduler' defined in class path resource [org/jobrunr/spring/autoconfigure/JobRunrAutoConfiguration.class]: Unsatisfied dependency expressed through method 'jobScheduler' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.exception.FlywaySqlException: Error while retrieving the list of applied migrations from Schema History table "public"."flyway_schema_history"

enter image description here I have currently disabled flyway for my application. How do I resolve this? I am using postgres 14.

EDIT Once I upgraded to latest version of jobrunr this is resolved.

0

There are 0 best solutions below