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

ResourceBundle.getBundle throws NoClassDefFoundError when fails to define a class

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b165
    • Verification:
      Verified

      Backports

        Description

        NCDFE thrown on OSX when there is a .properties and .class of the same case-insensitive spelling but different name.

        Java 9-internal: Exception in thread "main" java.lang.NoClassDefFoundError: de/rgra/nl/Messages (wrong name: de/rgra/nl/messages)
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:986)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1065)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:205)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:730)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:651)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:532)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
        at java.base/java.lang.Class.forName(Class.java:448)
        at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.lambda$loadResourceBundle$1(ResourceBundle.java:3567)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:428)
        at java.base/java.util.ResourceBundle$ResourceBundleProviderHelper.loadResourceBundle(ResourceBundle.java:3568)
        at java.base/java.util.ResourceBundle.loadBundle(ResourceBundle.java:1824)
        at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1754)
        at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1708)
        at java.base/java.util.ResourceBundle.findBundle(ResourceBundle.java:1708)
        at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1642)
        at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1562)
        at java.base/java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1536)
        at java.base/java.util.ResourceBundle.getBundle(ResourceBundle.java:837)
        at resourcebundle/de.rgra.nl.Messages.main(Messages.java:13)

        See http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-April/011952.html

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mchung Mandy Chung
                  Reporter:
                  mchung Mandy Chung
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: