Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-2731

HyphenationCompoundWordTokenFilter fails to load DTD in Crimson parser (JDK 1.4)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.4
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      HyphenationCompoundWordTokenFilter loads the DTD in its XML parser from memory by supplying EntityResolver. In Java 1.4 (affects Lucene 2.9, but also later versions if not Apache Xerces is used as XML parser) this does not work, because Cromson does not even ask the entity resolver, if no base URI is known. As the hyphenation file is loaded from Reader/InputStream no base URI is known. Crimson needs at least a non-null systemId to proceed.

      This patch (Lucene 2.9 only) fakes this by supplying a fake systemId to the InputSource.

        Attachments

        1. LUCENE-2731.patch
          1 kB
          Uwe Schindler

          Issue Links

            Activity

              People

              • Assignee:
                uschindler Uwe Schindler
                Reporter:
                uschindler Uwe Schindler
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: