openRDF.org Welcome Guest   | Login   
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Search  | Help  | RSS feeds

Forum has been closed down
This forum has been closed down due to extensive spamming activities. Please use the mailing list instead.


Quick Go »
Thread Status: Normal
Total posts in this thread: 6
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 2373 times and has 5 replies Next Thread
May 18, 2005 5:55:16 PM

tbeer
Member
Member's Avatar

Austria
Joined: May 17, 2005
Posts: 18
Status: Offline
Custom inferencing causes problems

Hi all!
I tried to add "inferencing rules" to my repository:

LocalService service = Sesame.getService();
RepositoryConfig config = new RepositoryConfig(this.repositoryId);

config.setWorldReadable(true);
config.setWorldWriteable(true);

RdfSchemaRepositoryConfig rdbmsSail =
new RdfSchemaRepositoryConfig();

// connection parameters
rdbmsSail.setParameter("jdbcUrl",jdbc:mysql://localhost/sesamenewdb");
rdbmsSail.setParameter("jdbcDriver", "com.mysql.jdbc.Driver");
rdbmsSail.setParameter("user", "sesame");
rdbmsSail.setParameter("password", "sesame");
// custom inferencer
rdbmsSail.setInferencerClass("org.openrdf.sesame.sailimpl.rdbms.CustomInferenceServices");
rdbmsSail.setParameter("rule-file", "C:\\customRules.xml");

config.addSail(rdbmsSail);
try {
LocalRepository myRepository =
service.createRepository(config);
}
catch ...

The line "service.createRepository(config);" leads to the following exception:

java.lang.ArrayIndexOutOfBoundsException: 2
at org.openrdf.sesame.sailimpl.rdbms.CustomInferenceServices.createDependenciesTable(CustomInferenceServices.java:648)
at org.openrdf.sesame.sailimpl.rdbms.RdfSchemaRepository._createDependenciesTable(RdfSchemaRepository.java:414)
at org.openrdf.sesame.sailimpl.rdbms.RdfSchemaRepository._createDbSchema(RdfSchemaRepository.java:317)
at org.openrdf.sesame.sailimpl.rdbms.RdfSource._initDatabase(RdfSource.java:368)
at org.openrdf.sesame.sailimpl.rdbms.RdfRepository._initDatabase(RdfRepository.java:176)
at org.openrdf.sesame.sailimpl.rdbms.RdfSource.initialize(RdfSource.java:331)
at org.openrdf.sesame.sailimpl.rdbms.RdfRepository.initialize(RdfRepository.java:162)
at org.openrdf.sesame.sailimpl.rdbms.RdfSchemaRepository.initialize(RdfSchemaRepository.java:180)
at org.openrdf.sesame.repository.local.LocalService._createRepository(LocalService.java:376)
at org.openrdf.sesame.repository.local.LocalService.getRepository(LocalService.java:238)
at org.openrdf.sesame.repository.local.LocalService.createRepository(LocalService.java:298)
at SesameTestImplementation.createRepository(SesameTestImplementation.java:127)
at SesameTestImplementation.<init>(SesameTestImplementation.java:45)
at SesameTestImplementation.main(SesameTestImplementation.java:289)

Everything worked fine before I added the "custom inferencer" (I dropped the complete database schema before I tried "custom inferencing").

Any Ideas?
I appreciate your help!

Thanks a lot,
Thomas
Show Printable Version of Post        http://www.etourism-austria.at [Link] Report threatening or abusive post: please login first  Go to top 
May 19, 2005 7:35:39 AM

damyan
Sesame developer
Member's Avatar


Joined: Feb 18, 2004
Posts: 44
Status: Offline
Re: Custom inferencing causes problems

Hi Thomas,

after checking the actual code I saw that it requires at least a single rule with more than 1 'premise' to be present in your rule file (customRules.xml), so check for it.

If that do not helps, please, post/publish your rule file here/somewhere to get further down into the problem.

damyan
----------------------------------------
[Edit 1 times, last edit by damyan at May 19, 2005 7:36:24 AM]
Show Printable Version of Post        7752212 [Link] Report threatening or abusive post: please login first  Go to top 
May 19, 2005 8:52:28 AM

tbeer
Member
Member's Avatar

Austria
Joined: May 17, 2005
Posts: 18
Status: Offline
Re: Custom inferencing causes problems

Hi damyan!
First of all thanks for your immediate response. After adding a second premise it runs. I am quite new to Sesame so my goal was to play a little with custom inferencing to find out whether it is suitable for our project. Can you tell me why there are more than one "premise" necessary?
Where can I find more examples or related docs? I just found the "entailment-owl-dlp.xml" example and the "Sesame User Guide".

Tom
Show Printable Version of Post        http://www.etourism-austria.at [Link] Report threatening or abusive post: please login first  Go to top 
May 27, 2005 1:38:45 PM

arjohn
OpenRDF project lead
Member's Avatar

The Netherlands
Joined: Jan 23, 2004
Posts: 1289
Status: Offline
Re: Custom inferencing causes problems

Damyan, this appears to be a bug in the custom inferencer, right? Want be to log it in the issue tracker as such?
----------------------------------------
Arjohn Kampman, OpenRDF project lead, Aduna
Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
May 28, 2005 7:52:54 AM

damyan
Sesame developer
Member's Avatar


Joined: Feb 18, 2004
Posts: 44
Status: Offline
Re: Custom inferencing causes problems

right, it is a bug - please log it!
I hope to get some time soon to look at it...
Show Printable Version of Post        7752212 [Link] Report threatening or abusive post: please login first  Go to top 
May 30, 2005 9:02:28 AM

arjohn
OpenRDF project lead
Member's Avatar

The Netherlands
Joined: Jan 23, 2004
Posts: 1289
Status: Offline
Re: Custom inferencing causes problems

Issue logged: [SES-167].
----------------------------------------
Arjohn Kampman, OpenRDF project lead, Aduna
Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
[Show Printable Version of Thread]