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

Exception "Duplicate field name&signature in class file" should report the name and signature of the field

    XMLWordPrintable

Details

    • b21

    Backports

      Description

        Sometimes I get the following exception when running unit tests:

        java.lang.ClassFormatError: Duplicate field name&signature in class file CampaignClient
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

        Unfortunately, without a field name + signature I have no way of knowing what
        is triggering the problem. The class in question is quite big so removing
        code by trial and error is very time consuming.

        Would like:

        java.lang.ClassFormatError: Duplicate field name LOG with signature
        org.slf4j.Logger in class file CampaignClient

        Attachments

          Issue Links

            Activity

              People

                shshahma Shafi Ahmad (Inactive)
                shadowbug Shadow Bug
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: