Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-12012

When customer tries to load a PDF with a PNG file they get a linkage error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • 2.6.2, 2.7.3
    • None

    Description

      Customer gets a linkage error when they try to load a PDF with a PNG.

      The java spec relating to these issues is here:

      http://java.sun.com/docs/books/jvms/second_edition/html/ConstantPool.doc.html

      The customer is seeing this error due to a loading constraint. Here is the explanation of class loading constraints:

      A loading constraint is violated if, and only if, all the following four
      conditions hold:

      There exists a loader L such that L has been recorded by the Java
      virtual machine as an initiating loader of a class C named N.

      There exists a loader L' such that L' has been recorded by the Java
      virtual machine as an initiating loader of a class C' named N.

      The equivalence relation defined by the (transitive closure of the) set
      of imposed constraints implies N L = N L'.

      C != C '.
      ***

      I 'think' that the idea is that if you have two different class loaders
      (L and L'), and each loads a class (L loads C and L' loads C') with the
      same name (N), loading constraints will be violated if C and C' are not
      the same class.

      So to bring this back around in relation to issue CSP-19301:

      The customer unpacked these jars that ship with confluence:
      saxon-6.5.3-patched.jar
      ss_css2-0.9.3.jar
      xml-apis-1.0.b2.jar
      xmlParserAPIs-2.2.1.jar

      There are incompatible versions of NodeClass included.

      you'll see that they differ in size (1630 vs 1597), indicating that they are different versions of the same class.

      rw-rr- 1 ubuntu ubuntu 1630 2000-10-09 18:02 ./saxon-6.5.3-patched.jar/org/w3c/dom/Node.class
      rw-rr- 1 ubuntu ubuntu 1630 2003-01-19 23:14 ./ss_css2-0.9.3.jar/org/w3c/dom/Node.class
      rw-rr- 1 ubuntu ubuntu 1597 2002-12-01 11:57 ./xml-apis-1.0.b2.jar/org/w3c/dom/Node.class
      rw-rr- 1 ubuntu ubuntu 1597 2002-11-11 18:24 ./xmlParserAPIs-2.2.1.jar/org/w3c/dom/Node.class

      The following error is thrown

      com.atlassian.core.exception.InfrastructureException: java.lang.LinkageError: Class org/w3c/dom/Node violates loader constraints

      So this leads back to the point:

      if you have two different class loaders
      (L and L'), and each loads a class (L loads C and L' loads C') with the
      same name (N), loading constraints will be violated if C and C' are not
      the same class.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              agoldman Andy Goldman [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: