Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15764

Cannot install some extensions in Jetty 9.4.12 using the Extension Manager when using the minimal war

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Thanks to our TestContainers-based testing fwk, I noticed that installing some extensions on Jetty fails with:

      Caused by: java.lang.Exception: Job execution failed. Response status code [500], reason [The job failed (InstallException: Dependency [org.ow2.asm:asm-commons-6.2.1] is not compatible with core extension feature [org.ow2.asm:asm-commons/6.2] ([org.ow2.asm:asm-commons/6.2]))]
      

      The reason is because we use ASM 6.2.1 in XWiki and Jetty bundles version 6.2 in its lib directory:

      jetty@02340d2a0684:/usr/local/jetty$ find . -name "*asm*.jar"
      ./lib/annotations/asm-commons-6.2.jar
      ./lib/annotations/asm-6.2.jar
      jetty@02340d2a0684:/usr/local/jetty$ 
      

      What's weird though is that according to http://www.eclipse.org/jetty/documentation/9.4.x/jetty-classloading.html#adding-extra-classpaths:

      Adding Jars under $jetty.home/lib/ext to the system classpath. You can place additional Jars here. The normal configuration is that each web context (web application or WAR file) has its own classloader, which has the system classloader as its parent

      and

      Classes contained within WEB-INF/lib or WEB-INF/classes have priority over classes on the parent classloader. This is the opposite of the normal behavior of a Java 2 classloader

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: