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

application using classloaders crashes with LinkageError (constraints) on java/l

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.2.2
    • hotspot
    • x86
    • windows_nt



      Name: js5519 Date: 11/09/99


      I cannot reproduce this in a simple test case I can send along.
      However, I can reproduce it in our environment, and I tried it with
      the JDK1.2.2 community source as well.

      We have a server with two custom classloaders that follow the JDK1.2
      loader hierarchy mechanism: subLoader->superLoader->systemLoader

      This works in most cases, but for one case throws an exception:
      "java.lang.LinkageError: Class java/lang/String violates loader constraints"

      Adding a zero argument constructor (the class being loaded that
      triggers this has none by default) that does System.out.println("HI")
      makes the exception go away.

      I looked at the JDK1.2.2 source a bit and found that
          src/share/javavm/runtime/classresolver.c (v. 1.173)
      seemed to be the culprit, not always correctly setting the links or
      pointers when a constraint structured gets resized.

      I downloaded the 1.3beta version of classresolver.c (v. 1.175), which
      only differs by a few lines and in this area, and, when compiled into
      my JDK 1.2.2 tree, seems to fix the problem.

      Will this fix show up in the JDK1.2.X line?
      (Review ID: 97615)
      ======================================================================

            hongzh Hong Zhang
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: