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
I expect AOT to compile the config, according to settings.
Actual Behaviour
AOT lets me know that logback must be north of 1.3:
Caused by: java.lang.IllegalStateException: The logback.xml conversion feature requires logback 1.3 on the AOT optimizer classpath.
at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:55)
at io.micronaut.aot.core.codegen.AbstractSingleClassFileGenerator.generate(AbstractSingleClassFileGenerator.java:35)
at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:87)
at io.micronaut.aot.core.codegen.ApplicationContextConfigurerGenerator.generate(ApplicationContextConfigurerGenerator.java:66)
at io.micronaut.aot.MicronautAotOptimizer$Runner.execute(MicronautAotOptimizer.java:343)
at io.micronaut.aot.MicronautAotOptimizer.execute(MicronautAotOptimizer.java:202)
... 15 more
So, I modify the version catalog to use Logback at 1.3.0, or 1.3.4 (the first 1.3.x or latest), and in either case, I get the exception:
Caused by: java.lang.IllegalAccessError: class io.micronaut.aot.std.sourcegen.Logback13GeneratorHelper tried to access field ch.qos.logback.core.joran.event.SaxEventRecorder.saxEventList (io.micronaut.aot.std.sourcegen.Logback13GeneratorHelper and ch.qos.logback.core.joran.event.SaxEventRecorder are in unnamed module of loader java.net.URLClassLoader @6fadae5d)
at io.micronaut.aot.std.sourcegen.Logback13GeneratorHelper.configureMethod(Logback13GeneratorHelper.java:133)
at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:61)
at io.micronaut.aot.core.codegen.AbstractSingleClassFileGenerator.generate(AbstractSingleClassFileGenerator.java:35)
at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:87)
at io.micronaut.aot.core.codegen.ApplicationContextConfigurerGenerator.generate(ApplicationContextConfigurerGenerator.java:66)
at io.micronaut.aot.MicronautAotOptimizer$Runner.execute(MicronautAotOptimizer.java:343)
at io.micronaut.aot.MicronautAotOptimizer.execute(MicronautAotOptimizer.java:202)
... 15 more
If I use 1.3.4 or 1.4.4without Logback config generation, I get:
Caused by: java.lang.RuntimeException: Compilation errors:
File unknown, line: -1, Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider io.micronaut.annotation.processing.TypeElementVisitorProcessor could not be instantiated
at io.micronaut.aot.MicronautAotOptimizer.throwCompilationError(MicronautAotOptimizer.java:240)
at io.micronaut.aot.MicronautAotOptimizer.compileGeneratedSources(MicronautAotOptimizer.java:140)
at io.micronaut.aot.MicronautAotOptimizer.access$200(MicronautAotOptimizer.java:98)
at io.micronaut.aot.MicronautAotOptimizer$Runner.execute(MicronautAotOptimizer.java:344)
at io.micronaut.aot.MicronautAotOptimizer.execute(MicronautAotOptimizer.java:202)
... 15 more
This forces me to use 1.2.11 (which works fine), as far as I can tell it is the only option usable with AOT enabled.
Steps To Reproduce
With Micronaut at latest
Use above configuration and Logback versions
Enable AOT with Logback config generation
Observe exceptions
Environment Information
Operating System: macOS Ventura
JDK Version: 17
Example Application
No response
Version
3.7.3
The text was updated successfully, but these errors were encountered:
i realize logback config gen is experimental, but the AOT plugin breaks the regular build even if Logback config gen is shut off, so long as Logback > 1.2 is installed (so far as I can tell).
Expected Behavior
In my version catalog:
In my
build.gradle.kts
:micronaut { aot { configFile.set(file("${rootProject.projectDir}/gradle/aot.properties")) } } dependencies { runtimeOnly(framework.logback) }
In my
gradle/aot.properties
:I expect AOT to compile the config, according to settings.
Actual Behaviour
AOT lets me know that
logback
must be north of1.3
:So, I modify the version catalog to use Logback at
1.3.0
, or1.3.4
(the first1.3.x
or latest), and in either case, I get the exception:If I use
1.3.4
or1.4.4
without Logback config generation, I get:This forces me to use
1.2.11
(which works fine), as far as I can tell it is the only option usable with AOT enabled.Steps To Reproduce
Environment Information
Example Application
No response
Version
3.7.3
The text was updated successfully, but these errors were encountered: