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

Martin O'Connor martin.oconnor at stanford.edu
Wed Jan 16 14:56:56 PST 2008


I would use the latest 3.4 beta if you are using SWRL extensively.

If you still get this exception it is likely that you have non OWL DL  
contructs in your ontology.

Martin

Quoting Manolis Nikoloudakis <frapedes at hotmail.com>:

>
> 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/





More information about the protege-owl mailing list