Hi everyone,

I am starting Apache Jena Fuseki with a Turtle configuration file to set up our 
services and dataset. We have a problem with loading the separate some.rules 
file from the classpath (or via the classloader) using the 'ja:rulesFrom' 
predicate of the reasoner.

If we set the 'ja:rulesFrom' predicate to '<some.rules>' (it expects a resource 
not a literal), the configuration fails to load because it cannot find this 
file. If we look a bit deeper (using the Java debugger), we notice that the 
'some.rules' gets transformed to 'C:some.rules' somewhere internally and it 
therefore does not look at the classpath, but at the local file system. Is 
there a way to reference the 'some.rules' file from the class path if the Turle 
configuration file is in the same location of the JAR? Something like: 
classloader:some.rules...or just '/some.rules' as would work with the 
this.getClass().getResourceAsStream('/some/rules'). I've tried several options, 
but all fail.

I did notice this in the documentation, which might be what explains the 
behaviour: "A resource name with no URI scheme is assumed to be a local file 
name." (https://jena.apache.org/documentation/io/rdf-input.html#api)

Regards, Barry


This message may contain information that is not intended for you. If you are 
not the addressee or if this message was sent to you by mistake, you are 
requested to inform the sender and delete the message. TNO accepts no liability 
for the content of this e-mail, for the manner in which you use it and for 
damage of any kind resulting from the risks inherent to the electronic 
transmission of messages.

Reply via email to