You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected
Allow custom implementation of the LiquibaseMigrator through inheritence such that one can customize different aspects when running the liquibase migrations, for instance, in my case I am trying apply migrations across all the different tenant's database schemas (Postgres) by dynamically setting the liquibaseSchema config
Actual
When I try to run the application, I am the error log below
ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Error loading bean [xyz.abc.MigrationHandler]: failed to access class io.micronaut.liquibase.LiquibaseMigrationRunner from class xyz.abc.$MigrationHandler$Definition$Exec (io.micronaut.liquibase.LiquibaseMigrationRunner and xyz.abc.$MigrationHandler$Definition$Exec are in unnamed module of loader 'app')
io.micronaut.context.exceptions.BeanContextException: Error loading bean [xyz.abc.MigrationHandler]: failed to access class io.micronaut.liquibase.LiquibaseMigrationRunner from class xyz.abc.$MigrationHandler$Definition$Exec (io.micronaut.liquibase.LiquibaseMigrationRunner and xyz.abc.$MigrationHandler$Definition$Exec are in unnamed module of loader 'app')
at io.micronaut.context.DefaultBeanContext.findBeanCandidates(DefaultBeanContext.java:2096)
at io.micronaut.context.DefaultApplicationContext.findBeanCandidates(DefaultApplicationContext.java:260)
at io.micronaut.context.DefaultBeanContext.findBeanCandidatesInternal(DefaultBeanContext.java:3348)
at io.micronaut.context.DefaultBeanContext.getBeanDefinitions(DefaultBeanContext.java:808)
at io.micronaut.context.DefaultBeanContext.getBeanDefinitions(DefaultBeanContext.java:802)
at io.micronaut.context.DefaultBeanContext.loadCreatedListeners(DefaultBeanContext.java:1825)
at io.micronaut.context.DefaultBeanContext.initializeEventListeners(DefaultBeanContext.java:1799)
at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:3325)
at io.micronaut.context.DefaultBeanContext.finalizeConfiguration(DefaultBeanContext.java:3684)
at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:341)
at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:194)
at io.micronaut.runtime.Micronaut.start(Micronaut.java:75)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:323)
at io.micronaut.runtime.Micronaut.run(Micronaut.java:309)
at xyz.abc.Application.main(Application.groovy:10)
Caused by: java.lang.IllegalAccessError: failed to access class io.micronaut.liquibase.LiquibaseMigrationRunner from class xyz.abc.$MigrationHandler$Definition$Exec (io.micronaut.liquibase.LiquibaseMigrationRunner and xyz.abc.$MigrationHandler$Definition$Exec are in unnamed module of loader 'app')
at xyz.abc.$MigrationHandler$Definition$Exec.<clinit>(Unknown Source)
at xyz.abc.$MigrationHandler$Definition.<init>(Unknown Source)
at xyz.abc.$MigrationHandler$Definition.<init>(Unknown Source)
at xyz.abc.$MigrationHandler$Definition$Reference.load(Unknown Source)
at io.micronaut.context.AbstractInitializableBeanDefinitionReference.load(AbstractInitializableBeanDefinitionReference.java:145)
at io.micronaut.context.DefaultBeanContext.findBeanCandidates(DefaultBeanContext.java:2094)
... 14 common frames omitted
Process finished with exit code 1
Here is a trimed down custom implementation of the LiquibaseMigrator, I am using Groovy, though I've adapted it for java too.
Issue description
Expected
Allow custom implementation of the
LiquibaseMigrator
through inheritence such that one can customize different aspects when running the liquibase migrations, for instance, in my case I am trying apply migrations across all the different tenant's database schemas (Postgres) by dynamically setting theliquibaseSchema
configActual
When I try to run the application, I am the error log below
Here is a trimed down custom implementation of the
LiquibaseMigrator
, I am using Groovy, though I've adapted it for java too.The text was updated successfully, but these errors were encountered: