Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log4j2 - ran into issues with mn #321

Open
sdelamo opened this issue Oct 28, 2024 · 2 comments
Open

log4j2 - ran into issues with mn #321

sdelamo opened this issue Oct 28, 2024 · 2 comments
Assignees
Labels
type: bug Something isn't working

Comments

@sdelamo
Copy link
Contributor

sdelamo commented Oct 28, 2024

Discussed in micronaut-projects/micronaut-core#11082

Originally posted by waveskimmer August 13, 2024
Using

mn create-app demo -b=gradle_kotlin --jdk=21 --lang=kotlin --features=yaml,log4j2

I'm getting this error:

> Task :prepareJitOptimizations FAILED
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/Users/A618887/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.23.1/9ef67909a1b4eae999af4c7a211ab2379e4b86c2/log4j-slf4j-impl-2.23.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at io.micronaut.aot.cli.Main.executeInIsolatedLoader(Main.java:113)
        at io.micronaut.aot.cli.Main.run(Main.java:87)

Any ideas?

@sdelamo sdelamo transferred this issue from micronaut-projects/micronaut-core Oct 28, 2024
@sdelamo
Copy link
Contributor Author

sdelamo commented Nov 8, 2024

@melix can you check this:

> Task :prepareJitOptimizations FAILED
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
SLF4J(W): Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
SLF4J(W): Ignoring binding found at [jar:file:/Users/sdelamo/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.23.1/9ef67909a1b4eae999af4c7a211ab2379e4b86c2/log4j-slf4j-impl-2.23.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J(W): See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at io.micronaut.aot.cli.Main.executeInIsolatedLoader(Main.java:113)
        at io.micronaut.aot.cli.Main.run(Main.java:87)
        at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
        at picocli.CommandLine.access$1500(CommandLine.java:148)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
        at picocli.CommandLine.execute(CommandLine.java:2170)
        at io.micronaut.aot.cli.Main.execute(Main.java:134)
        at io.micronaut.aot.cli.Main.main(Main.java:138)
Caused by: java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at io.micronaut.aot.cli.Main.executeInIsolatedLoader(Main.java:107)
        ... 11 more
Caused by: java.lang.IllegalStateException: The logback.xml conversion feature requires logback 1.4 on the AOT optimizer classpath.
        at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:53)
        at io.micronaut.aot.core.codegen.AbstractSingleClassFileGenerator.generate(AbstractSingleClassFileGenerator.java:35)
        at io.micronaut.aot.std.sourcegen.LogbackConfigurationSourceGenerator.generate(LogbackConfigurationSourceGenerator.java:85)
        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)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        ... 13 more

@sdelamo sdelamo added the type: bug Something isn't working label Nov 8, 2024
@sdelamo sdelamo removed this from 4.7.0 Release Nov 8, 2024
@melix
Copy link
Collaborator

melix commented Nov 8, 2024

I will take a look but I can't do it until Tuesday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants