micronaut-projects / micronaut-flyway

Integration between Micronaut and Flyway
Apache License 2.0
38 stars 21 forks source link

Failed migrations via micronaut-jpa cause beanCreation error with no failed migration logs #77

Open nhoughto opened 4 years ago

nhoughto commented 4 years ago

If a migration fails (invalid SQL etc, whatever) whilst being applied by micronaut-flyway in the context of a micronaut-jpa project a bean creation error is thrown but no migration failure logging from flyway is shown, making it very hard to diagnose what the actual problem is.

Looking at the BeanCreatedEventListener, DataSourceMigrationRunner it doesn't do any logging of the exception?

https://github.com/micronaut-projects/micronaut-flyway/blob/9863860ed1baf9a6fe461f4c13a06e9cccb54dcb/flyway/src/main/java/io/micronaut/flyway/DataSourceMigrationRunner.java#L64

Logs:

2020-07-14 01:44:43:870       main INFO  tractFlywayMigration -                           - Running migrations for database with qualifier [default]
2020-07-14 01:44:43:875       main INFO  cense.VersionPrinter -                           - Flyway Community Edition 6.4.4 by Redgate
2020-07-14 01:44:43:963       main INFO  base.DatabaseFactory -                           - Database: jdbc:postgresql://pro-rds-stub:5432/db (PostgreSQL 12.3)
2020-07-14 01:44:44:058       main INFO  l.command.DbValidate -                           - Successfully validated 2 migrations (execution time 00:00.035s)
2020-07-14 01:44:44:077       main INFO  al.command.DbMigrate -                           - Current version of schema "public": 1
2020-07-14 01:44:44:113       main INFO  al.command.DbMigrate -                           - Migrating schema "public" to version 2 - account
2020-07-14 01:44:44:148       main ERROR al.command.DbMigrate -                           - Migration of schema "public" to version 2 - account failed! Changes successfully rolled back.
2020-07-14 01:44:44:170       main ERROR ut.runtime.Micronaut -                           - Error starting Micronaut server: Bean definition [com.test.$UserControllerDefinition$Intercepted] could not be loaded: Error instantiating bean of type  [org.hibernate.boot.registry.StandardServiceRegistry]

Message: Bean Factory [Definition: io.micronaut.configuration.hibernate.jpa.EntityManagerFactoryBean] returned null
Path Taken: SessionFactory.hibernateSessionFactory([SessionFactoryBuilder sessionFactoryBuilder]) --> SessionFactoryBuilder.hibernateSessionFactoryBuilder([MetadataSources metadataSources],ValidatorFactory validatorFactory) --> MetadataSources.hibernateMetadataSources(JpaConfiguration jpaConfiguration,[StandardServiceRegistry standardServiceRegistry]) --> StandardServiceRegistry.hibernateStandardServiceRegistry(String dataSourceName,[DataSource dataSource])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [com.test.$UserControllerDefinition$Intercepted] could not be loaded: Error instantiating bean of type  [org.hibernate.boot.registry.StandardServiceRegistry]

Message: Bean Factory [Definition: io.micronaut.configuration.hibernate.jpa.EntityManagerFactoryBean] returned null
Path Taken: SessionFactory.hibernateSessionFactory([SessionFactoryBuilder sessionFactoryBuilder]) --> SessionFactoryBuilder.hibernateSessionFactoryBuilder([MetadataSources metadataSources],ValidatorFactory validatorFactory) --> MetadataSources.hibernateMetadataSources(JpaConfiguration jpaConfiguration,[StandardServiceRegistry standardServiceRegistry]) --> StandardServiceRegistry.hibernateStandardServiceRegistry(String dataSourceName,[DataSource dataSource])
    at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1533)
    at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:220)
    at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:2763)
    at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:227)
    at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:166)
    at io.micronaut.runtime.Micronaut.start(Micronaut.java:64)
    at com.test.Main.main(Main.java:17)
Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type  [org.hibernate.boot.registry.StandardServiceRegistry]

Message: Bean Factory [Definition: io.micronaut.configuration.hibernate.jpa.EntityManagerFactoryBean] returned null
Path Taken: SessionFactory.hibernateSessionFactory([SessionFactoryBuilder sessionFactoryBuilder]) --> SessionFactoryBuilder.hibernateSessionFactoryBuilder([MetadataSources metadataSources],ValidatorFactory validatorFactory) --> MetadataSources.hibernateMetadataSources(JpaConfiguration jpaConfiguration,[StandardServiceRegistry standardServiceRegistry]) --> StandardServiceRegistry.hibernateStandardServiceRegistry(String dataSourceName,[DataSource dataSource])
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1897)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2630)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2616)
    at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2299)
    at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2273)
    at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:715)
    at io.micronaut.configuration.hibernate.jpa.TransactionalSessionInterceptor.<init>(TransactionalSessionInterceptor.java:50)
    at io.micronaut.configuration.hibernate.jpa.$TransactionalSessionInterceptorDefinition.build(Unknown Source)
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1888)
    at io.micronaut.context.DefaultBeanContext.getScopedBeanForDefinition(DefaultBeanContext.java:2386)
    at io.micronaut.context.DefaultBeanContext.addCandidateToList(DefaultBeanContext.java:2957)
    at io.micronaut.context.DefaultBeanContext.getBeansOfTypeInternal(DefaultBeanContext.java:2838)
    at io.micronaut.context.DefaultBeanContext.getBeansOfType(DefaultBeanContext.java:1039)
    at io.micronaut.context.AbstractBeanDefinition.lambda$getBeansOfTypeForConstructorArgument$9(AbstractBeanDefinition.java:1165)
    at io.micronaut.context.AbstractBeanDefinition.resolveBeanWithGenericsFromConstructorArgument(AbstractBeanDefinition.java:1844)
    at io.micronaut.context.AbstractBeanDefinition.getBeansOfTypeForConstructorArgument(AbstractBeanDefinition.java:1160)
    at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:1009)
    at io.micronaut.configuration.hibernate.jpa.$TransactionalSession$InterceptedDefinition.build(Unknown Source)
    at io.micronaut.context.BeanDefinitionDelegate.build(BeanDefinitionDelegate.java:143)
    at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1888)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2630)
    at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2616)
    at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2299)
    at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2273)
    at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1233)
    at io.micronaut.context.AbstractBeanDefinition.getBeanForField(AbstractBeanDefinition.java:1465)
    at io.micronaut.context.AbstractBeanDefinition.injectBeanField(AbstractBeanDefinition.java:751)
ilopmar commented 4 years ago

@nhoughto You didn't mention Micronaut and Micronaut-Flyway version. With Micronaut 2.0.1 I'm not able to reproduce the issue. Please take a look at this test application https://github.com/micronaut-core-issues-test-app/issue-flyway-77

I've added a migration with an SQL error and this is the log when starting the application. As you can see there is plenty of information regarding the migration that failed:

$  ./gradlew run

> Task :run FAILED
12:54:07.844 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
12:54:08.026 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
12:54:08.031 [main] INFO  i.m.flyway.AbstractFlywayMigration - Running migrations for database with qualifier [default]
12:54:08.035 [main] INFO  o.f.c.i.license.VersionPrinter - Flyway Community Edition 6.4.4 by Redgate
12:54:08.062 [main] INFO  o.f.c.i.database.DatabaseFactory - Database: jdbc:h2:mem:devDb (H2 1.4)
12:54:08.116 [main] INFO  o.f.core.internal.command.DbValidate - Successfully validated 2 migrations (execution time 00:00.021s)
12:54:08.129 [main] INFO  o.f.c.i.s.JdbcTableSchemaHistory - Creating Schema History table "PUBLIC"."flyway_schema_history" ...
12:54:08.164 [main] INFO  o.f.core.internal.command.DbMigrate - Current version of schema "PUBLIC": << Empty Schema >>
12:54:08.167 [main] INFO  o.f.core.internal.command.DbMigrate - Migrating schema "PUBLIC" to version 1 - create-books-schema
12:54:08.190 [main] INFO  o.f.core.internal.command.DbMigrate - Migrating schema "PUBLIC" to version 2 - insert-data-books
12:54:08.195 [main] ERROR o.f.core.internal.command.DbMigrate - Migration of schema "PUBLIC" to version 2 - insert-data-books failed! Please restore backups and roll back database and code!
12:54:08.209 [main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [javax.sql.DataSource] could not be loaded: 
Migration V2__insert-data-books.sql failed
------------------------------------------
SQL State  : 42000
Error Code : 42000
Message    : Syntax error in SQL statement "INSERT INTO books (id, name) VALUES (1, Building Microservice[*]');
"; SQL statement:
INSERT INTO books (id, name) VALUES (1, Building Microservice');
 [42000-199]
Location   : db/migration/V2__insert-data-books.sql (/home/ivan/workspaces/micronaut-apps/issue-flyway-77/build/resources/main/db/migration/V2__insert-data-books.sql)
Line       : 1
Statement  : INSERT INTO books (id, name) VALUES (1, Building Microservice');

io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [javax.sql.DataSource] could not be loaded: 
Migration V2__insert-data-books.sql failed
------------------------------------------
SQL State  : 42000
Error Code : 42000
Message    : Syntax error in SQL statement "INSERT INTO books (id, name) VALUES (1, Building Microservice[*]');
"; SQL statement:
INSERT INTO books (id, name) VALUES (1, Building Microservice');
 [42000-199]
Location   : db/migration/V2__insert-data-books.sql (/home/ivan/workspaces/micronaut-apps/issue-flyway-77/build/resources/main/db/migration/V2__insert-data-books.sql)
Line       : 1
Statement  : INSERT INTO books (id, name) VALUES (1, Building Microservice');

        at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1540)
        at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:220)
        at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:2768)
        at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:228)
        at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:166)
        at io.micronaut.runtime.Micronaut.start(Micronaut.java:64)
        at io.micronaut.runtime.Micronaut.run(Micronaut.java:294)
        at io.micronaut.runtime.Micronaut.run(Micronaut.java:280)
        at com.example.Application.main(Application.java:8)
Caused by: org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException: 
Migration V2__insert-data-books.sql failed
------------------------------------------
SQL State  : 42000
Error Code : 42000
Message    : Syntax error in SQL statement "INSERT INTO books (id, name) VALUES (1, Building Microservice[*]');
"; SQL statement:
INSERT INTO books (id, name) VALUES (1, Building Microservice');
 [42000-199]
Location   : db/migration/V2__insert-data-books.sql (/home/ivan/workspaces/micronaut-apps/issue-flyway-77/build/resources/main/db/migration/V2__insert-data-books.sql)
Line       : 1
Statement  : INSERT INTO books (id, name) VALUES (1, Building Microservice');

        at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:369)
        at org.flywaydb.core.internal.command.DbMigrate.access$200(DbMigrate.java:54)
        at org.flywaydb.core.internal.command.DbMigrate$3.call(DbMigrate.java:282)
        at org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate.execute(TransactionalExecutionTemplate.java:66)
        at org.flywaydb.core.internal.command.DbMigrate.applyMigrations(DbMigrate.java:279)
        at org.flywaydb.core.internal.command.DbMigrate.migrateGroup(DbMigrate.java:244)
        at org.flywaydb.core.internal.command.DbMigrate.access$100(DbMigrate.java:54)
        at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:162)
        at org.flywaydb.core.internal.command.DbMigrate$2.call(DbMigrate.java:159)
        at org.flywaydb.core.internal.jdbc.TableLockingExecutionTemplate$1.call(TableLockingExecutionTemplate.java:38)
        at org.flywaydb.core.internal.jdbc.TransactionalExecutionTemplate.execute(TransactionalExecutionTemplate.java:66)
        at org.flywaydb.core.internal.jdbc.TableLockingExecutionTemplate.execute(TableLockingExecutionTemplate.java:33)
        at org.flywaydb.core.internal.database.base.Connection.lock(Connection.java:129)
        at org.flywaydb.core.internal.schemahistory.JdbcTableSchemaHistory.lock(JdbcTableSchemaHistory.java:140)
        at org.flywaydb.core.internal.command.DbMigrate.migrateAll(DbMigrate.java:159)
        at org.flywaydb.core.internal.command.DbMigrate.migrate(DbMigrate.java:137)
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:199)
        at org.flywaydb.core.Flyway$1.execute(Flyway.java:159)
        at org.flywaydb.core.Flyway.execute(Flyway.java:530)
        at org.flywaydb.core.Flyway.migrate(Flyway.java:159)
        at io.micronaut.flyway.AbstractFlywayMigration.runFlyway(AbstractFlywayMigration.java:90)
        at io.micronaut.flyway.AbstractFlywayMigration.run(AbstractFlywayMigration.java:74)
        at io.micronaut.flyway.DataSourceMigrationRunner.lambda$null$0(DataSourceMigrationRunner.java:64)
        at java.util.Optional.ifPresent(Optional.java:159)
        at io.micronaut.flyway.DataSourceMigrationRunner.lambda$onCreated$1(DataSourceMigrationRunner.java:64)
        at java.util.Optional.ifPresent(Optional.java:159)
        at io.micronaut.flyway.DataSourceMigrationRunner.onCreated(DataSourceMigrationRunner.java:61)
        at io.micronaut.flyway.DataSourceMigrationRunner.onCreated(DataSourceMigrationRunner.java:37)
        at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1945)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2635)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2621)
        at io.micronaut.context.DefaultBeanContext.loadContextScopeBean(DefaultBeanContext.java:2163)
        at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1538)
        ... 8 common frames omitted
Caused by: org.flywaydb.core.internal.sqlscript.FlywaySqlScriptException: 
Migration V2__insert-data-books.sql failed
------------------------------------------
SQL State  : 42000
Error Code : 42000
Message    : Syntax error in SQL statement "INSERT INTO books (id, name) VALUES (1, Building Microservice[*]');
"; SQL statement:
INSERT INTO books (id, name) VALUES (1, Building Microservice');
 [42000-199]
Location   : db/migration/V2__insert-data-books.sql (/home/ivan/workspaces/micronaut-apps/issue-flyway-77/build/resources/main/db/migration/V2__insert-data-books.sql)
Line       : 1
Statement  : INSERT INTO books (id, name) VALUES (1, Building Microservice');

        at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:275)
        at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:220)
        at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:127)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:88)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.access$000(SqlMigrationExecutor.java:33)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:77)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor$1.call(SqlMigrationExecutor.java:74)
        at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:28)
        at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:74)
        at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:366)
        ... 40 common frames omitted
Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "INSERT INTO books (id, name) VALUES (1, Building Microservice[*]');
"; SQL statement:
INSERT INTO books (id, name) VALUES (1, Building Microservice');
 [42000-199]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)
        at org.h2.message.DbException.get(DbException.java:205)
        at org.h2.message.DbException.get(DbException.java:181)
        at org.h2.message.DbException.getSyntaxError(DbException.java:229)
        at org.h2.command.Parser.getSyntaxError(Parser.java:989)
        at org.h2.command.Parser.checkRunOver(Parser.java:5129)
        at org.h2.command.Parser.initialize(Parser.java:5031)
        at org.h2.command.Parser.parse(Parser.java:775)
        at org.h2.command.Parser.parse(Parser.java:764)
        at org.h2.command.Parser.prepareCommand(Parser.java:683)
        at org.h2.engine.Session.prepareLocal(Session.java:627)
        at org.h2.engine.Session.prepareCommand(Session.java:565)
        at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1292)
        at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:217)
        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:205)
        at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:95)
        at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java)
        at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:244)
        at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:111)
        at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:208)
        ... 48 common frames omitted

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/home/ivan/.sdkman/candidates/java/8.0.252-open/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
3 actionable tasks: 1 executed, 2 up-to-date
nhoughto commented 4 years ago

Hmm nope can repro on 2.0.1 / latest versions

Yours seems to fail on DataSource, my run fails on org.hibernate.SessionFactory, its like if you just use a DataSource it works, but if it is trying to inject a DataSource into JPA/hibernate it swallows the error..

nhoughto commented 4 years ago

I guess ill see if I can make your repro repo match my experience and then get back to you 👍

ilopmar commented 4 years ago

Closing due to lack of feedback. If the problem persist please try with the latest version and open a new issue. Thanks.

sambalmueslie commented 2 years ago

Closing due to lack of feedback. If the problem persist please try with the latest version and open a new issue. Thanks.

Looks like I have something similar? https://stackoverflow.com/q/70413053/7776688

ilopmar commented 2 years ago

@sambalmueslie please include a project that reproduces the problem and I'll take a look at it.

sambalmueslie commented 2 years ago

https://github.com/sambalmueslie/hll-tool

sambalmueslie commented 2 years ago

What i found while debugging, within DefaultBeanContext.java:3051 the beanConcreteCandidateCache returns an Optional.empty, but the check afterwards DefaultBeanContext.java:3053 checks on null?

grafik

sambalmueslie commented 2 years ago

Investigated any further. Within DefaultBeanContext.java :2081 he cannot find the type within beanDefinitionClasses. Results in zero candiated for bean Type

grafik

sambalmueslie commented 2 years ago

and here are some more infos

Good Case (after upgrading to micronaut 3.1.0 gradle plugin)

11:26:41.422 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 388 services of type io.micronaut.inject.BeanDefinitionReference 11:26:41.425 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.inject.BeanDefinitionReference services took 271ms 11:26:41.743 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 7 services of type io.micronaut.context.env.PropertySourceLoader 11:26:41.743 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.context.env.PropertySourceLoader services took 6ms 11:26:41.807 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 8 services of type io.micronaut.inject.BeanConfiguration 11:26:41.807 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.inject.BeanConfiguration services took 3ms

Bad case, after changing @KafkaClient (removing value for id, so nothing which causes the problem)

11:28:29.636 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 373 services of type io.micronaut.inject.BeanDefinitionReference 11:28:29.639 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.inject.BeanDefinitionReference services took 242ms 11:28:29.810 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 7 services of type io.micronaut.context.env.PropertySourceLoader 11:28:29.810 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.context.env.PropertySourceLoader services took 7ms 11:28:29.878 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loaded 8 services of type io.micronaut.inject.BeanConfiguration 11:28:29.878 [main] DEBUG i.m.c.io.service.SoftServiceLoader - Loading io.micronaut.inject.BeanConfiguration services took 5ms

There is definitively a difference between the loaded References.

sambalmueslie commented 2 years ago

I found a workaround, if he did not find all classes, running gradle clean build manually solves the issue.