Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Jena 2.7.0
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)