Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8056900

Enhance NoClassDefFound exception messaging

XMLWordPrintable

    • b21

      It is hard to debug NoClassDefFoundErrors. These exceptions can be thrown from different places, but it is hard to know exactly where in the process we fail. One example is the exception thrown at:

      http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/38539608359a/src/share/vm/prims/jvm.cpp#l917

      Here, we throw a NoClassDefFoundError because the name cannot fit into the constant pool. However, we give no hint to that in the exception message. Debugging this would be very hard as the problem is not that the class is not in the classpath, but rather that we run out of space.

      We should go through the different places NoClassDefFoundError can be thrown, and make sure we give a decent messages, and show where we actually fail.

            hseigel Harold Seigel (Inactive)
            mcastegr Mattis Castegren (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: