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

cryptic error message: LinkageError [classname] violates loader constraints

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 1.4.2
    • hotspot
    • b93
    • generic
    • windows_xp

      When two classes of the same name are loaded inconsistently, the VM issues the above LinkageError, but the error message is very cryptic.

      At the very least it can refer to the VM spec section 5.3.4. Furthermore, it should provide more information (such as (a) which class loader tried to load the 2nd class, (b) which class loader loaded the original definition, (c) where those two classes are being loaded from.)
      Also, if I'm not mistaken, the error message could be further improved to indicate exactly which
      constraint is violated.

      All of those information makes it easier for developers to track down the problem. If you search
      Google with "LinkageError loader constraints", you'll see how developers out there are hopelessly
      confused with this error.

      Finally, the definition of the loader constraints in the VM spec is hard to understand for most of the people. Perhaps it could be clarified in somewhere?

      ###@###.### 2003-12-23

            dholmes David Holmes
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: