2

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!)

enter image description here

Lots of these:

Showing entries from Apr 25, 20:11:32

  1. 20:11:32.492. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  2. 20:11:37.500. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  3. 20:11:37.702. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  4. 20:11:42.701. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  5. 20:11:42.905. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  6. 20:11:47.913 WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
  7. 20:11:48.099. WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load
2
  • We get the same Warning. we runnig a large spring web app in a tomcat 9 in docker container. What we have figured out is that the docker image 9.0.60-jdk11-openjdk is using the jdk 11.0.14.1+1 which is run without warnings. The 9.0.62-jdk11-openjdk using jdk 11.0.15+10 and voila the warning pop up. BUG in JDK? ``` WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load WARNING: Could not find Java_java_lang_ClassLoader_00024NativeLibrary_load ``` Fortunately, the app runs without us noticing any errors. Commented May 20, 2022 at 15:20
  • We changed our dockerfile config a few days after reporting to be very specific and created a Jira on our backlog to look into issue more so we can later upgrade... Change we made was: # JIRA-NO Using specific version of 11.0.14.1 as we were having issues with Could not find Java_java_lang_ClassLoader FROM openjdk:11.0.14.1-jre-slim Commented Jun 11, 2022 at 12:47

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.