Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-621

OntDocumentManager always resolves policy file to ont-policy.rdf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Jena 2.11.0
    • Jena 2.11.1
    • Ontology API
    • None

    Description

      Follows on from JENA-525.

      The OntDocumentManager has a default path for looking for policy files of file:ont-policy.rdf;file:etc/ont-policy.rdf but as of commit r1455078 / 2013-03-11, the default policy files go into src/main/resources.

      OntDocumentManager uses the old/core FileManager explicitly in findMetadata with file, URL and classloader locators.

      The core LocatorClassloader converts URIs to plain file names which then have no file: so it looks up ont-policy.rdf on the locator list. This is always found by the class loader - it's in the jar. file:etc/ont-policy.rdf will never be tried.

      The consequence is that file:ont-policy.rdf is always found - it may be a real file or in the jar.

      Workaround

      Set the path explicitly with OntDocumentManager.setMetadataSearchPath

      Attachments

        1. jena-621-v1.patch
          11 kB
          Andy Seaborne

        Issue Links

          Activity

            People

              andy Andy Seaborne
              andy Andy Seaborne
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: