Search Mailing List Archives
[protege-dev] Exception when executing custom built-in with Jess
Martin O'Connor
sunid at stanford.edu
Tue Mar 6 10:40:57 PST 2018
That is not at the beginning of the method. There are several commands before it that could throw exceptions.
Can you just replace the entire method body with a log command and see if there is still an exception?
e.g.,
public boolean mymethod(List<SWRLBuiltInArgument> arguments) throws SWRLBuiltInException
{
System.out.println("my method");
}
Martin
On Mar 5, 2018, at 10:59 PM, maha <maha_isims at hotmail.com<mailto:maha_isims at hotmail.com>> wrote:
Hello
I put the instruction System.out.println at the beginning of my method
.
.
checkNumberOfArgumentsEqualTo(numberOfArguments, arguments.size());
String s1 = getArgumentAsAString(argument1Number, arguments);
String s2 = getArgumentAsAString(argument2Number, arguments);
System.out.println("opening line of the function");
but it does not display in the log file of protege,
.
.
.
2018.03.06 07:43:54.525 CET INFO: Rule engine 'SWRLJessBridge' registered
with the SWRLTab. -- SWRLRuleEngineFactory.registerRuleEngine()
2018.03.06 07:43:54.537 CET INFO: Plugin 'SWRLJessBridge' registered with
the SWRLTab plugin manager. -- BridgePluginManager.registerPlugin()
2018.03.06 07:43:54.546 CET INFO: Plugin 'SQWRLQueryTab' registered with the
SWRLTab plugin manager. -- BridgePluginManager.registerPlugin()
neither in the console after running the rule in JessTab.
Exception running rule engine: error running Jess rule engine: Jess reported
an error in routine invokeSWRLBuiltIn
while executing (invokeSWRLBuiltIn "Rule-1"
"http://www.owl-ontologies.com/Ontology1481027354.owl#mymethod" 0 true ?xx
?yy)
while executing defrule MAIN::Rule-1.
Message: exception thrown by built-in mybuiltin:mymethod in rule Rule-1:
edu.stanford.smi.protegex.owl.swrl.bridge.exceptions.BuiltInException:
unknown exception thrown by built-in mybuiltin:mymethod in rule Rule-1:
java.lang.reflect.InvocationTargetException.
--
Sent from: http://protege-project.136.n4.nabble.com/Protege-Developer-f4659816.html
_______________________________________________
protege-dev mailing list
protege-dev at lists.stanford.edu<mailto:protege-dev at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/protege-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20180306/8c9ee769/attachment.html>
More information about the protege-dev
mailing list