Reputation: 39
Have large spring boot app and seeing the following message every few seconds in Kibana logs for Java app.
WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
I suspect something that has come in between Java 11 OpenJdk version after 22nd Apr 2022 and on/at 25th Apr 2022. 11-jre-slim: Pulling from library/openjdk
Looked in the code and can not see anything standing out. Looked at the Java source code and can see C code (oh no!)
Lots of these:
Showing entries from Apr 25, 20:11:32
Upvotes: 2
Views: 783
Reputation: 151
For anyone waiting for a fix for this, Elastic APM Agent has been updated to include a new version of async-profiler which avoids the problem on the mentioned JDKs: https://github.com/elastic/apm-agent-java/issues/2759#issuecomment-1246507167
Upvotes: 3
Reputation: 472
Highly likely that this is a bug in async-profiler, not in java.
Async profiler does try to intercept NativeLibraries::load resp. load0 and replace the original implementation the JVM provides with its own. See https://github.com/jvm-profiling-tools/async-profiler/blob/5312a793ec22106420883e8a274d10c390e6e4b1/src/profiler.cpp#L582-L615
Not sure if they still do this, but they did for a while.
See comments in bug report https://bugs.openjdk.org/browse/JDK-8288547.
Upvotes: 0
Reputation: 45
We opened a new Bug in Oracle because of this problem. In our case we are using ElasticAPM with java 11.0.15 and that's causing this error. We checked the java source code and found that is probably related to the last changes in openJDK11
Here is the link to the bug in Oracle.
Upvotes: 1