I am using owlim se (5.2.5479) and I want to implement a custom rule for my dataset. I have read most of the approaches suggested by our talented pool of professionals including forcing the implementation through tomcat opts and also declearing the path in the owlim:ruleset parameter of the various .ttl files (such as in %aduna%..). My problem is that I get an error (when uploading data) which is as follows: org.openrdf.repository.RepositoryException: Failed to delete repository: org.openrdf.repository.RepositoryException: org.openrdf.sail.SailException: Failed initializing inferencer. This error is evident when I include the path of my custom ruleset in the owlim:ruleset parameter of the .ttl files in %aduna% and owlim tmplate file (owlim-se.ttl file). I am running Tomcat on JDK 6 and I am using java 1.6.0_45 and apache tomcat 6.0.37. I have also tried other combination of both java and different newer versions of tomcat such as 7.0.45. My Owlim license is still valid.

my custom rule is as follows: Id: rdfs14 n <:will> m a <:make> n b <:make> m
a <:solved> g a <:solved> s ------------------------------- b <:solved> g b <:solved> s

This ruleset is implemented by modifying builtin_RdfsRules.pie file. I have tried both forcing the rule from tomcat and modifying the .ttl file.

Please some one should help me by directing me on what to do?



asked 14 Nov '13, 11:33

honour's gravatar image

accept rate: 0%

Are you trying to change existing ruleset? The thing is that once you create repository, you can not manipulate with custom rule file. When you do it, you can not normally delete it. But I dont know whether it is your case.

(14 Nov '13, 11:37) Marek Šurek

Owlim does not accept uri's without namespaces within the rulefile, e.g. <:solved> is not a valid uri.

add a prefix within Prefices section, e.g. something like: p : http://test.org/schema#

then use it within your rule definition:

Id: rdfs14 n <p:will> m a <p:make> n b <p:make> m a <p:solved> g a <p:solved> s

b <p:solved> g 
b <p:solved> s

of course, your data also should make use of these properties so that the rule is triggered



answered 15 Nov '13, 12:02

Damyan%20Ognyanov's gravatar image

Damyan Ognyanov ♦♦
accept rate: 25%

Thanks so much for the correction. However, the error is still there. I receive the same very error after following your instruction. Few other things that I tried doing through tomcat are the use of -Djava.io.tmpdir and -Druleset to enforce writing of appropriate data on corresponding files (incase there are read only restrictions). The error is

org.openrdf.repository.RepositoryException: Failed to delete repository: org.openrdf.repository.RepositoryException: org.openrdf.sail.SailException: Failed initializing inferencer.

I still hope for more directions from you or anyother person. Thanks HTH for your direction.

(15 Nov '13, 22:20) honour

Sesame always initialises a repository prior to doing something with it, even when deleting it (this exception is thrown by HttpClient.deleteRepository). Could you please post more info about the exception? You can find it in the logs in <aduna-folder>/openrdf-sesame/logs/main-<date>.log.

If the repository removal fails a possible workaround is to remove the info about it from the SYSTEM repository and to delete its folder located in <aduna-folder>/openrdf-sesame/repositories/<repo-name>.

To delete the repository info, switch to the SYSTEM repository and use the following query to select the graph in which the repository info resides:

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sys:<http://www.openrdf.org/config/repository#>

select ?g
where {

graph ?g { ?x sys:repositoryID "<your-repo-name>" } .


Then select the result for ?g, go to the 'Clear' section in the openrdf-workbench, paste the value and push the 'Clear context(s)' button. When you click on the 'Repositories' section you won't see the repository any more. Then remove its folder from the disk.


answered 18 Nov '13, 07:53

Ruslan's gravatar image

Ruslan ♦
accept rate: 25%

edited 18 Nov '13, 07:55

More information form log Caused by: java.lang.RuntimeException: Cannot delete file 'C:Windowssystem32configsystemprofileAppDataRoamingAdunaOpenRDF Sesamerepositorieshwustoragestack0'. at com.ontotext.trree.io.ReadWriteFile.<init>(Unknown Source) at com.ontotext.trree.io.ReadWriteFile.<init>(Unknown Source) ... 38 common frames omitted [ERROR] 2013-11-18 08:45:01,207 [repositories/hwu] Error while handling request (500): org.openrdf.repository.RepositoryException: . . . . . org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760) at java.lang.Thread.run(Thread.java:662)[ ERROR] 2013-11-18 13:39:18,429 [repositories/hwu] Error while handling request (500): org.openrdf.repository.RepositoryException: org.openrdf.sail.SailException: Failed initializing inferencer

Please note: com.ontotext.trree is created as a subfolder of the folder from -Djava.io.tmpdir as instructed in tomcat. This error is log when I want to upload data to the created repository.

(18 Nov '13, 09:21) honour

It looks like the file is locked because it is read by another process, e.g. another repository situated in the same storage folder (this will definitely result in an error under Windows). Is this the only repository in your Tomcat or you host other repositories as well ? I don't think that the error is related to -Djava.io.tmpdir in any way, it's rather related to the storage-folder parameter. Can you check whether two repositories share the same storage-folder ? This parameter shouldn't be used with the -D command line option when dealing with more than one repository. If you don't use -Dstorage-folder then this effect is maybe result of copy-pasting the same ttl config file for another repository ?

(19 Nov '13, 10:22) Ruslan ♦

Thanks all, for the various response to this problem. I found out that I placed my .ttl file in a wrong aduna folder thus having two different owlim-se.ttl files. It is a storage-folder parameter problem. Thanks so much for all your contributions. The file is now loading (for nearly four hours) without problems.

(20 Nov '13, 06:13) honour
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14 Nov '13, 11:33

Seen: 3,603 times

Last updated: 06 Jul, 02:39

powered by BitNami OSQA