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] doubt regarding creating the owl model

Timothy Redmond tredmond at stanford.edu
Fri Mar 30 08:13:59 PDT 2007


> I am getting this error message---->
> Exception in thread "main" java.lang.Error: Unresolved compilation  
> problem:
>         The return type is incompatible with
> DefaultCls.getBrowserSlotPattern(),
> AbstractRDFSClass.getBrowserSlotPattern()
>
>         at
> edu.stanford.smi.protegex.owl.model.impl.DefaultOWLNamedClass. 
> (DefaultOWLNamedClass.java:42)

The error means what it says - you have a compiler time error in your  
sources..   Some development environments have this nice feature that  
you can do many things - including run the program - when there are  
compile errors.  I know that eclipse can do this.  I don't know how  
to do this with a command line compile but perhaps this is also  
possible?

So then I looked closer at the problem.  First the compile error is  
happening in the core protege and protege owl code.  So I just  
updated all the sources off the svn tree and they compiled fine.   
This strongly suggests that you - possibly inadvertently - modified  
some of the protege code in your development environment.  An  
alternative possibility - I don't know if this would match your  
symptoms - is that you are using the wrong version of java.  You  
should be running and compiling with 1.5.

The error says that it cannot construct the DefaultOWLNamedClass  
because the hierarchy for this class is defined incorrectly. In  
particular the DefaultOWLNamedClass or some superclass is returning  
the wrong type in the getBrowserSlotPattern.  Your development  
environment should indicate your compile time errors somewhere.  Look  
at this list of problems and find out what the problem is.

-Timothy


On Mar 30, 2007, at 7:11 AM, chandu wrote:

> import java.util.*;
> import java.io.*;
> import edu.stanford.smi.protegex.owl.*;
> import edu.stanford.smi.protegex.owl.model.OWLModel;
> import edu.stanford.smi.protegex.owl.jena.*;
>
> class First
>
> {
>         public static void main(String[] args) throws Exception
>         {
>                 File file = new File("family.swrl.owl");
>
>                 String uri = (file.toURI()).toString();
>
>
>                 JenaOWLModel owlModel =  
> ProtegeOWL.createJenaOWLModelFromURI(uri);
>
>                 System.out.println(uri);
>
>         }
>
> }
>
>
> I am getting this error message---->
> Exception in thread "main" java.lang.Error: Unresolved compilation  
> problem:
>         The return type is incompatible with
> DefaultCls.getBrowserSlotPattern(),
> AbstractRDFSClass.getBrowserSlotPattern()
>
>         at
> edu.stanford.smi.protegex.owl.model.impl.DefaultOWLNamedClass. 
> (DefaultOWLNamedClass.java:42)
>         at
>
> edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.getRootCls 
> (AbstractOWLModel.java:2686)
>         at
> edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.adjustThing( 
> AbstractOWLModel.java:694)
>         at
>
> edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.resetSystemF 
> rames(AbstractOWLModel.java:477)
>         at
> edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel. 
> (AbstractOWLModel.java:460)
>
>         at edu.stanford.smi.protegex.owl.jena.JenaOWLModel. 
> (JenaOWLModel.java:112)
>         at
> edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.createKnow 
> ledgeBase(JenaKnowledgeBaseFactory.java
> :104)
>         at edu.stanford.smi.protege.model.Project.createDomainKB 
> (Project.java:346)
>         at  
> edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase 
> (Project.java:364)
>         at edu.stanford.smi.protege.model.Project
> .(Project.java:276)
>         at edu.stanford.smi.protege.model.Project.(Project.java:260)
>         at edu.stanford.smi.protege.model.Project.createNewProject 
> (Project.java:462)
>         at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModel
> (ProtegeOWL.java:67)
>         at
> edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI 
> (ProtegeOWL.java:92)
>         at First.main(First.java:15)
>
>
>
>
> Any problem with the jar files? or am i missing something? i  
> couldnt get it.
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/ 
> faq.html#01a.03




More information about the protege-owl mailing list