compatibility issue with 3.4.1 and 4.0

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

compatibility issue with 3.4.1 and 4.0

Ziqi Zhang
Hi,
I am using protege 3.4.1 API and the contained protege OWL api to process an OWL file created using Protege 4.0. I have problems with loading the OWL file, when the following method is called:
 
>> ProtegeOWL.createJenaOWLModelFromURI("file:/home/aprotege4.owl") <<
 
I get an exception whose full stack trace is below. The OWL imports lots of other ontologies, and from the stacktrace I cannot work out which part has gone wrong. I wonder if it is possible to use protege4 API to process OWLs, which I cannot find any documentations... In any case, any suggestions are highly appreciated!
 
 
 
 
Loading triples from: file:/home/aprotege4.owl
    Completed triple loading after 416 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/product.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/product.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
    Completed triple loading after 91 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/user.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/user.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
    Completed triple loading after 20 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/generic.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/generic.owl from location:http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
    Completed triple loading after 69 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/time.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
23-Feb-2011 11:32:46 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/time.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
    Completed triple loading after 12 ms
Importing http://www.w3.org/2006/time from location: http://www.w3.org/2006/time
23-Feb-2011 11:32:46 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://www.w3.org/2006/time from location: http://www.w3.org/2006/time
Loading triples from: http://www.w3.org/2006/time
    Completed triple loading after 115 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/process.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
23-Feb-2011 11:32:47 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/process.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
    Completed triple loading after 8 ms
Postprocess: Process entities with incorrect Java type (2 entities) ...
Error at processing entity with incorrect Java type: http://www.w3.org/2000/01/rdf-schema#Literal -- java.lang.ClassCastException: edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass cannot be cast to edu.stanford.smi.protege.model.Slot
 at edu.stanford.smi.protege.model.framestore.Record.replaceFrameReference(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.InMemoryFrameDb.replaceFrameKey(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.InMemoryFrameDb.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.ClosureCachingBasicFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.ImmutableNamesNarrowFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.SimpleFrameStore.swizzleInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.processFramesWithWrongJavaType(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
 
    Frames with wrong Java type: [http://www.w3.org/2000/01/rdf-schema#Literal]
 -- TriplePostProcessor.processFramesWithWrongJavaType()5 ms
Postprocess: Process metaclasses (3 metaclasses) ... 0 ms
Postprocess: Process subclasses of rdf:List (1 classes) ... 1 ms
Postprocess: Instances with multiple types (130 instances) ... 10 ms
SEVERE: Error at loading file file:/home/aprotege4.owl--  Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more
 
WARNING: Exception caught  --  Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more
 
 Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more

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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: compatibility issue with 3.4.1 and 4.0

Timothy Redmond

It very much seems that you are having an OWL 2 vs. OWL 1 issue.  There are some constructs in OWL 2 that don't exist in OWL 1 and there cannot be processed by an OWL 1 editor such as Protege 3.  I found at least one of the offending constructs.  The ontologies that you import use the construct

exactly 1 Thing

Unfortunately this particular construct could have been expressed with an OWL 1.0 equivalent construct but this is what is giving you trouble.

Also I would recommend that you use Protege 4.1.  Protege 4.0 may generate some owl output that is not proper OWL 2.

-Timothy


On 02/23/2011 03:50 AM, Ziqi Zhang wrote:
Hi,
I am using protege 3.4.1 API and the contained protege OWL api to process an OWL file created using Protege 4.0. I have problems with loading the OWL file, when the following method is called:
 
>> ProtegeOWL.createJenaOWLModelFromURI("file:/home/aprotege4.owl") <<
 
I get an exception whose full stack trace is below. The OWL imports lots of other ontologies, and from the stacktrace I cannot work out which part has gone wrong. I wonder if it is possible to use protege4 API to process OWLs, which I cannot find any documentations... In any case, any suggestions are highly appreciated!
 
 
 
 
Loading triples from: file:/home/aprotege4.owl
    Completed triple loading after 416 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/product.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/product.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/product.owl
    Completed triple loading after 91 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/user.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/user.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/user.owl
    Completed triple loading after 20 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/generic.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
23-Feb-2011 11:32:45 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/generic.owl from location:http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/generic.owl
    Completed triple loading after 69 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/time.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
23-Feb-2011 11:32:46 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/time.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/time.owl
    Completed triple loading after 12 ms
Importing http://www.w3.org/2006/time from location: http://www.w3.org/2006/time
23-Feb-2011 11:32:46 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://www.w3.org/2006/time from location: http://www.w3.org/2006/time
Loading triples from: http://www.w3.org/2006/time
    Completed triple loading after 115 ms
Importing http://myontologies.co.uk/projects/myproject/ontologies/process.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
23-Feb-2011 11:32:47 edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel loadImportedAssertions
INFO: Importing http://myontologies.co.uk/projects/myproject/ontologies/process.owl from location: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
Loading triples from: http://myontologies.co.uk/projects/myproject/ontologies/process.owl
    Completed triple loading after 8 ms
Postprocess: Process entities with incorrect Java type (2 entities) ...
Error at processing entity with incorrect Java type: http://www.w3.org/2000/01/rdf-schema#Literal -- java.lang.ClassCastException: edu.stanford.smi.protegex.owl.model.impl.DefaultRDFSNamedClass cannot be cast to edu.stanford.smi.protege.model.Slot
 at edu.stanford.smi.protege.model.framestore.Record.replaceFrameReference(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.InMemoryFrameDb.replaceFrameKey(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.InMemoryFrameDb.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.ClosureCachingBasicFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.ImmutableNamesNarrowFrameStore.replaceFrame(Unknown Source)
 at edu.stanford.smi.protege.model.framestore.SimpleFrameStore.swizzleInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.processFramesWithWrongJavaType(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
 
    Frames with wrong Java type: [http://www.w3.org/2000/01/rdf-schema#Literal]
 -- TriplePostProcessor.processFramesWithWrongJavaType()5 ms
Postprocess: Process metaclasses (3 metaclasses) ... 0 ms
Postprocess: Process subclasses of rdf:List (1 classes) ... 1 ms
Postprocess: Instances with multiple types (130 instances) ... 10 ms
SEVERE: Error at loading file file:/home/aprotege4.owl--  Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more
 
WARNING: Exception caught  --  Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more
 
 Errors at post processing ontology
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.run(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.loadKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protege.model.Project.loadDomainKB(Unknown Source)
 at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.creator.OwlProjectFromUriCreator.create(Unknown Source)
 at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromURI(Unknown Source)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.createOntologyModel(WorkflowAnnotator.java:141)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotator.annotateXPDL(WorkflowAnnotator.java:121)
 at uk.ac.shef.oak.workflowannotator.WorkflowAnnotatorPhilips.main(WorkflowAnnotatorPhilips.java:36)
Caused by: java.lang.ClassCastException: edu.stanford.smi.protege.model.DefaultCls cannot be cast to edu.stanford.smi.protegex.owl.model.RDFResource
 at edu.stanford.smi.protegex.owl.model.impl.AbstractRDFSClass.createInstance(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.handleUndefinedSubject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedObject(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.resolvUndefinedTriple(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessorForUntypedResources.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.createUntypedResources(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TriplePostProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.TripleProcessor.doPostProcessing(Unknown Source)
 at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.doFinalPostProcessing(Unknown Source)
 ... 10 more
_______________________________________________ protege-discussion mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/protege-discussion Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03


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

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
Reply | Threaded
Open this post in threaded view
|

Re: compatibility issue with 3.4.1 and 4.0

Thomas Russ
In reply to this post by Ziqi Zhang

On Feb 23, 2011, at 3:50 AM, Ziqi Zhang wrote:

>  I wonder if it is possible to use protege4 API to process OWLs,  
> which I cannot find any documentations

Yes, you can use that.

Protege 4 uses the OWL-API, which is actually separate from Protege  
(unlike in Protege 3.x)
You can find documentation and code at  http://owlapi.sourceforge.net/documentation.html
_______________________________________________
protege-discussion mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03