Run Drools error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Run Drools error

Lili Shi
Hi,

I built an ontology using protege, and also create a rule in SWRLTab. After click the "Run Drools" button, the error occurred:
Exception running rule engine: error inserting asserted OWL axioms into Drools:
[Error: invoker.invoke("R1", "swrlb:lessThan", 0, false, new VPATH(), new BAVNs("x", ""), $x, new L("6", "xsd:int")): built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0]
[Near : {... invoker.invoke("R1", "swrlb:le ....}]
             ^
[Line: 1, Column: 1]: built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: [Error: invoker.invoke("R1", "swrlb:lessThan", 0, false, new VPATH(), new BAVNs("x", ""), $x, new L("6", "xsd:int")): built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0]
[Near : {... invoker.invoke("R1", "swrlb:le ....}]
             ^
[Line: 1, Column: 1]: built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0

What's the problem? Can anybody help me?
Thanks a lot!
Best wishes,
Li


 



 


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Run Drools error

Michael DeBellis-2
It would be easier to debug if you included the actual rule as well as the error. I think the problem may be with one of the variables in your lessThan statement.  Perhaps you have a variable like “x”. If you want x to be something that gets bound in the rule you need a question mark before it  so ”?x” not “x”.  If you just have “x” with no question mark then SWRL will expect x to already be bound (i.e., the name of some individual). That’s my best guess based on the debug statement. Probably others are better at deciphering those debug messages than I am but if what I’ve said doesn’t help I would suggest sending the rule with the debug message (you can even include the whole ontology if it isn’t proprietary and not too big). 

Michael

Sent from my iPad

On Oct 26, 2018, at 6:17 AM, Lili Shi <[hidden email]> wrote:

Hi,

I built an ontology using protege, and also create a rule in SWRLTab. After click the "Run Drools" button, the error occurred:
Exception running rule engine: error inserting asserted OWL axioms into Drools:
[Error: invoker.invoke("R1", "swrlb:lessThan", 0, false, new VPATH(), new BAVNs("x", ""), $x, new L("6", "xsd:int")): built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0]
[Near : {... invoker.invoke("R1", "swrlb:le ....}]
             ^
[Line: 1, Column: 1]: built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: [Error: invoker.invoke("R1", "swrlb:lessThan", 0, false, new VPATH(), new BAVNs("x", ""), $x, new L("6", "xsd:int")): built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0]
[Near : {... invoker.invoke("R1", "swrlb:le ....}]
             ^
[Line: 1, Column: 1]: built-in exception thrown by built-in swrlb:lessThan in rule R1: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: exception thrown by built-in swrlb:lessThan in rule R1: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0: expecting literal, got individual with IRI http://webprotege.stanford.edu/project/VMfq4mQERIqIag8mWZALK#3 for (0-offset) argument #0

What's the problem? Can anybody help me?
Thanks a lot!
Best wishes,
Li


 



 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user