Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

-Xcheck:jni with JDK 1.8.0_60 now causes a flood of WARNINGs

doubletrouble-JavaNetAug 21 2015 — edited Sep 8 2015

I have been using the java command line option -Xcheck:jni for years now, without seeing many (any?) issues ever being raised, until now.

I just updated to the latest JDK yesterday (1.8.0_60, for Windows 64 bit), and now my apps generate tons of console WARNING messages and stack traces.  At the end of this post, I list some of them.

Anyone know what is happening?

I did a web search, but found nothing related to what I am seeing (just old posts like this).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WARNING: JNI local refs: zu, exceeds capacity: zu

    at java.lang.System.initProperties(Native Method)

    at java.lang.System.initProperties(Native Method)

    at java.lang.System.initProperties(Native Method)

    at java.lang.System.initializeSystemClass(Unknown Source)

    at java.lang.System.initializeSystemClass(Unknown Source)

    at java.lang.System.initializeSystemClass(Unknown Source)

WARNING: JNI local refs: zu, exceeds capacity: zu

    at java.net.NetworkInterface.getAll(Native Method)

    at java.net.NetworkInterface.getNetworkInterfaces(Unknown Source)

    at sun.security.provider.SeedGenerator.addNetworkAdapterInfo(Unknown Source)

    at sun.security.provider.SeedGenerator.access$000(Unknown Source)

    at sun.security.provider.SeedGenerator$1.run(Unknown Source)

    at sun.security.provider.SeedGenerator$1.run(Unknown Source)

    at java.security.AccessController.doPrivileged(Native Method)

    at sun.security.provider.SeedGenerator.getSystemEntropy(Unknown Source)

    at sun.security.provider.SecureRandom$SeederHolder.<clinit>(Unknown Source)

    at sun.security.provider.SecureRandom.engineNextBytes(Unknown Source)

    - locked <0x00000000fc5ec1c0> (a sun.security.provider.SecureRandom)

    at java.security.SecureRandom.nextBytes(Unknown Source)

    - locked <0x00000000fc5ec4e0> (a java.security.SecureRandom)

    at java.security.SecureRandom.next(Unknown Source)

    at java.util.Random.nextLong(Unknown Source)

    at org.mortbay.jetty.servlet.HashSessionIdManager.doStart(HashSessionIdManager.java:139)

    ...

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

    at java.lang.ClassLoader.findBootstrapClass(Native Method)

    at java.lang.ClassLoader.findBootstrapClassOrNull(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    - locked <0x00000000fbd80198> (a java.lang.Object)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    - locked <0x00000000fbd800f0> (a java.lang.Object)

    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    at java.lang.ClassLoader.loadClass(Unknown Source)

    ...

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

    at java.io.FileOutputStream.writeBytes(Native Method)

    at java.io.FileOutputStream.write(Unknown Source)

    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)

    at java.io.BufferedOutputStream.flush(Unknown Source)

    - locked <0x00000000f3c7b958> (a java.io.BufferedOutputStream)

    at java.io.PrintStream.write(Unknown Source)

    - locked <0x00000000f3c7b938> (a java.io.PrintStream)

    at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)

    at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)

    at sun.nio.cs.StreamEncoder.flushBuffer(Unknown Source)

    - locked <0x00000000f3c7ba80> (a java.io.OutputStreamWriter)

    at java.io.OutputStreamWriter.flushBuffer(Unknown Source)

    at java.io.PrintStream.write(Unknown Source)

    - locked <0x00000000f3c7b938> (a java.io.PrintStream)

    at java.io.PrintStream.print(Unknown Source)

    at java.io.PrintStream.println(Unknown Source)

    - locked <0x00000000f3c7b938> (a java.io.PrintStream)

    ...

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

    at java.lang.Runtime.runFinalization0(Native Method)

    at java.lang.Runtime.runFinalization(Unknown Source)

    at java.lang.System.runFinalization(Unknown Source)

    ...

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

    at java.net.SocketOutputStream.socketWrite0(Native Method)

    at java.net.SocketOutputStream.socketWrite(Unknown Source)

    at java.net.SocketOutputStream.write(Unknown Source)

    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)

    at java.io.BufferedOutputStream.flush(Unknown Source)

    - locked <0x00000000f45962f0> (a java.io.BufferedOutputStream)

    at java.io.DataOutputStream.flush(Unknown Source)

    ...

This post has been answered by User812177-Oracle on Aug 21 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2015
Added on Aug 21 2015
3 comments
9,010 views