Lucene - Core
  1. Lucene - Core
  2. LUCENE-670

improper isolation (overuse of system properties) allows Lucene apps to clobber each other

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Duplicate
    • Affects Version/s: 1.9, 2.0.0
    • Fix Version/s: None
    • Component/s: core/index, core/store
    • Labels:
      None
    • Environment:

      Tomcat

      Description

      As nicely stated by the Javadoc for org.apache.commons.discovery.tools.ManagedProperties, "System properties are global in nature, so using them easily violates sound architectural and design principles for maintaining separation between components and runtime environments." Lucene's use of system properties makes it so that one web application that uses Lucene can break another web application that uses Lucene.

      Both org.apache.lucene.index.SegmentReader and org.apache.lucene.store.FSDirectory use system properties to locate an implementation class. Because of this, two applications can step on each others' toes.

      So, I have two webapps running in Tomcat. One uses the Compass Framework which sets the SegmentReader implementation class to org.apache.lucene.index.CompassSegmentReader. My other webapp tries to initialize SegmentReader in a different classloader, and it fails with an ExceptionInInitializerError because it can't load that class. If I get lucky, the non-Compass webapp loads first and things run smoothly.

        Issue Links

          Activity

          Ken Geis created issue -
          Hoss Man made changes -
          Field Original Value New Value
          Link This issue is part of LUCENE-636 [ LUCENE-636 ]
          Hoss Man made changes -
          Resolution Duplicate [ 3 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Otis Gospodnetic made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Workflow jira [ 12383217 ] Default workflow, editable Closed status [ 12562503 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12562503 ] jira [ 12584775 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Ken Geis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development