-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[native-image] NoClassDefFoundError when working with LOG4J2 dependencies #671
Comments
I am hitting the same issue. |
From https://logging.apache.org/log4j/2.x/manual/async.html
You can see this in the sources here. I can get past this error by adding this dependency to my pom.xml:
More reading: https://logging.apache.org/log4j/2.x/runtime-dependencies.html#log4j-core |
Sure, but this is a runtime dependency, not needed if you don't activate that kind of aync loggers (i don't have it on any of my projects), so should GraalVM generate that kind of errors in this situation ? |
@SR-G is right, you shouldn't have to add dependencies that you don't actually use. However, native-image currently has issues with incomplete class paths leading to errors like the one reported here. We are working on a solution, in the meantime the workaround is to make sure you have a complete classpath, like proposed by @jhult . |
@cstancu, any updates on this? I talked to @christianwimmer at OpenWorld and he indicated a Maven plugin may soon be available to help add all dependencies to the classpath. |
@jhult the incomplete class path support is under testing, ironing out some corner cases. The maven plugin is already available, it was released as part of rc8. See the release notes: |
This issue is fixed by |
NoClassDefFoundError with some LOG4J2 dependencies.
Simple project allowing to reproduce the issue located here :
https://github.com/SR-G/graalvm-bug-noclassdeffounderror
Bug probably related to #353
Happening with 1.0.0-rc6 :
Stacktrace for reference :
The text was updated successfully, but these errors were encountered: