-
Notifications
You must be signed in to change notification settings - Fork 232
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
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. #204
Comments
@msailes Can we get an official response on this question? Is there an upcoming change that will address it? Thanks. |
I've seen this online at https://stackoverflow.com/a/67976381/7174346
Can someone please confirm? |
Hi @wolkenschieber, @dankirkd , From the developer guide
mkdir -p expanded
unzip path/to/my/function.zip -d expanded
find ./expanded/lib -name '*.jar' | xargs -n1 zipinfo -1 | grep '.*.class' | sort | uniq -c | sort Mark |
What is the solution here, if Multi-Release cannot be used? What is the correct way to get rid of this warning message? |
using Graylog version 5 + java 11 = WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. showing the same issue |
me too, have you gotten any soution? |
Here's what's happening. (See
I infer that the new Java 9+ version of Log4j Basically in the multi-release JAR there is a Thus it appears (after limited testing) that adding the following to your Maven Shade Plugin <relocations>
<relocation>
<pattern>META-INF/versions/9/org/apache/logging/log4j/</pattern>
<shadedPattern>org/apache/logging/log4j/</shadedPattern>
</relocation>
</relocations> Using this technique, you can remove the Note that this is more important than just preventing the warnings. Apparently no one realized that following the AWS docs and using Log4j with the Maven Shade Plugin was leaving everyone using Java 9+ with old pre-Java 9 versions of some Log4j classes. The AWS Lambda Power Tools team is considering using the SLF4J API directly instead of requiring Log4j (see aws-powertools/powertools-lambda-java#965) so hopefully that effort gets some traction. Unfortunately that won't help those who are using Log4j with |
there's a note in public docs about how to deploy multi release jars to lambda: https://docs.aws.amazon.com/lambda/latest/dg/java-package.html search for MRJAR there |
When spinning up a Lambda with Java 11 and log4j2 logging, the first message is
This probably is induced by log4j2.
My logging depencies are
The shade configuration is
The text was updated successfully, but these errors were encountered: