DDS Java Example throws tons of warnings "JNI call made without checking exceptions"

696 views Asked by At

When I run the Java example OpenDDS-3.14.1/java/tests/messenger I am getting tons of messages like this:

WARNING in native method: JNI call made without checking exceptions when required to from CallStaticObjectMethodV.

I am using the openjdk 11.0.9.1 2020-11-04 LTS on a Mac. But same warnings I get on Linux.

Is that just not handled well in the example?
Or is it not well handled in the DDS-Java-Wrapper?
I have to admin that I have not yet read any Developer Documentation...

1

There are 1 answers

0
Fred Hornsey On BEST ANSWER

JNI is what allows Java and the native C++ code to interact with one another. OpenDDS's JNI code isn't checking for Java exceptions like it should and this is what the warnings are about. They show up in the all Java tests I can see, but apparently they are ignored by the system that report errors and warnings. I think they come up because -Xcheck:jni is one of the java arguments in the test script framework. So if you take out that argument of the file I linked or run java directly without that argument the warnings shouldn't be there.