Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] SWRL rule execution exception

Manolis Nikoloudakis frapedes at hotmail.com
Wed Jan 16 14:50:55 PST 2008


Hello,
I created the swrl rules with 3.3.1 protege version.
When i run them from java i get:
 
Rule engine 'SWRLJessBridge' registered with the SWRLTab bridge.Exception in thread "main" java.lang.ClassCastException: edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass cannot be cast to edu.stanford.smi.protegex.owl.model.OWLNamedClass        at edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getOWLNamedClass(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.ClassInfo.<init>(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importOWLClass(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importOWLClasses(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importOWLProperty(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importOWLProperties(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importSWRLRulesAndOWLKnowledge(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.importSWRLRulesAndOWLKnowledge(Unknown Source)        at edu.stanford.smi.protegex.owl.swrl.bridge.SWRLRuleEngineBridge.infer(Unknown Source)        at reasoner.Reasoner.runRuleEngine(Reasoner.java:102)        at master.Main.main(Main.java:42)
 
Main.java:        String uri = "http://localhost/www/protege/instance2.owl";        OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri);        Reasoner myreasoner=new Reasoner(owlModel);                myreasoner.runRuleEngine();//line 42
 
Reasoner.java:
public void runRuleEngine() throws SWRLRuleEngineBridgeException{            Rete rete=new Rete();        SWRLJessBridge bridge=null;        bridge = new SWRLJessBridge(this.owlModel, rete);        bridge.infer();//line102}
 
Manolis.
 
 
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20080116/573a8707/attachment.html>


More information about the protege-owl mailing list