Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2437

Stop relying on alphabetical loading of jars in WEB-INF/lib

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 5.0
    • Fix Version/s: 6.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      18
    • Documentation Status:
      Needed

      Description

      This bug affects people who using the practice of keeping customizations to modules such as DSpace-API in the /modules/additions folder according to the docs at:
      https://wiki.duraspace.org/display/DSDOC5x/Advanced+Customisation

      These customizations will be packaged as additions.jar and end up in the WEB-INF/lib directory together with the standard dspace-api and other JARS.

      Right now, there is no custom classloader or other mechanism that guarantees that the servlet container will use the classes in additions.jar instead of the other ones. Tomcat v5-v7 happen to load the jars alphabetically, and because additions.jar comes first, these classes get loaded.

      This is not part of the servlet spec, nor documented in Tomcat:
      http://stackoverflow.com/questions/5474765/order-of-loading-jar-files-from-lib-directory (answer with 18 pluses).

      This bug will not manifest for people using Tomcat v5-v7 but WILL result in problems for people on Tomcat 8 according to this report:
      https://issues.apache.org/bugzilla/show_bug.cgi?id=57129
      (Won't fix - Tomcat says applications, like DSpace should deal with it, and not Tomcat itself)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tdonohue Tim Donohue
              Reporter:
              bram Bram Luyten (Atmire)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: