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

RulesetNotFoundException when using umlauts in comments

    XMLWordPrintableJSON

    Details

      Description

      A RulesetNotFoundException occurs, when loading rules (Rule.rulesFromUrl(..)) from a text file that contains umlauts in comments.

      EDIT:

      I wasn't aware of that, but yes the file is encoded in latin-1. However, I found it confusing that a 'NoRulesetFoundException' was thrown when the file obviously existed. Apart from the file's location there was no indication of what exactly the problem was.

      Anyway, here is the code, a sample rule and the exception I am getting.

      Rule.rulesFromURL("file:C:
      example.rules");

      @prefix ex: <http://www.example.org#>
      @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

      //öäü
      [
      (?x rdfs:label ?y)
      ->
      (?x ex:hasLabel ?y)
      ]

      com.hp.hpl.jena.shared.RulesetNotFoundException: file:C:/example.rules
      at com.hp.hpl.jena.reasoner.rulesys.Rule.rulesFromURL(Rule.java:488)

        Attachments

          Activity

            People

            • Assignee:
              rvesse Rob Vesse
              Reporter:
              oosr Ooser
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: