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-discussion] Export ontology from Protege server

Tania Tudorache tudorache at stanford.edu
Fri Jun 24 16:16:11 PDT 2011


Hi Jie,

We analyzed what happened. The export of this particular ontology was 
corrupted because of an invalid statement in the ontology. If you look 
at the attached screenshot, you will see that the class "matrix" has one 
statement: rdfs:subClassOf Cls(@A25...) that has type string. This is an 
invalid statement, and I am not sure how it got in there. In any case, I 
removed this statement from the WebProtege server (the enhanced OBI 
project), and the export works now fine.

We were able to reproduce the corrupted exported file. What happened is 
that the export process would throw an exception about the invalid 
statement in the Protege client console, but then it would continue the 
export in a bad state. So, it corrupted the output file. The export 
process should have stopped with an error message. We'll try to fix this 
for the next Protege release.

In any case, I am glad that we identified the exact cause of this 
problem, and we were able to fix the ontology.

Tania




On 06/22/2011 01:22 PM, Jie Zheng wrote:
> Hi Tania,
>
> I saw the pop-up window you mentioned and the exported ontology is 
> worked this time. However, the export process is incredible slow. I 
> waited for about 7 minutes until the pop-up window showed up.
>
> However, I got error again when exporting another ontology from same 
> Protege server. *The error message when open the exported ontology 
> using Protege 4.1 is:*
> " org.semanticweb.owlapi.rdf.syntax.RDFParserException: 
> [line=553:column=56] Cannot answer characters when object properties 
> are excepted.
> org.semanticweb.owlapi.rdf.syntax.RDFParserException: 
> [line=553:column=56] Cannot answer characters when object properties 
> are excepted.
>
>
> Full Stack Trace
> -----------------------------------------------------------------------------------------
>
> org.coode.owlapi.rdfxml.parser.OWLRDFXMLParserSAXException: 
> org.semanticweb.owlapi.rdf.syntax.RDFParserException: 
> [line=553:column=56] Cannot answer characters when object properties 
> are excepted.
>     at 
> org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:129)
>     at 
> uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:204)
>     at 
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:725)
>     at 
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:682)
>     at 
> org.protege.editor.owl.model.OWLModelManagerImpl.loadOntologyFromPhysicalURI(OWLModelManagerImpl.java:317)
>     at 
> org.protege.editor.owl.OWLEditorKit.handleLoadFrom(OWLEditorKit.java:180)
>     at 
> org.protege.editor.owl.OWLEditorKit.handleLoadRequest(OWLEditorKit.java:174)
>     at 
> org.protege.editor.core.ProtegeManager.openAndSetupEditorKit(ProtegeManager.java:157)
>     at 
> org.protege.editor.core.ProtegeWelcomeFrame$ProtegeWelcomePanel$2.actionPerformed(ProtegeWelcomeFrame.java:139)
>     at 
> org.protege.editor.core.ui.util.LinkLabel.activateLink(LinkLabel.java:102)
>     at 
> org.protege.editor.core.ui.util.LinkLabel.access$100(LinkLabel.java:30)
>     at 
> org.protege.editor.core.ui.util.LinkLabel$1.mouseReleased(LinkLabel.java:68)
>     at java.awt.Component.processMouseEvent(Unknown Source)
>     at javax.swing.JComponent.processMouseEvent(Unknown Source)
>     at java.awt.Component.processEvent(Unknown Source)
>     at java.awt.Container.processEvent(Unknown Source)
>     at java.awt.Component.dispatchEventImpl(Unknown Source)
>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>     at java.awt.Component.dispatchEvent(Unknown Source)
>     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>     at java.awt.Window.dispatchEventImpl(Unknown Source)
>     at java.awt.Component.dispatchEvent(Unknown Source)
>     at java.awt.EventQueue.dispatchEvent(Unknown Source)
>     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>     at java.awt.EventDispatchThread.run(Unknown Source)
> Caused by: org.semanticweb.owlapi.rdf.syntax.RDFParserException: 
> [line=553:column=56] Cannot answer characters when object properties 
> are excepted.
>     at 
> org.semanticweb.owlapi.rdf.syntax.RDFParser$PropertyElementList.characters(RDFParser.java:938)
>     at 
> org.semanticweb.owlapi.rdf.syntax.RDFParser.characters(RDFParser.java:307)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.characters(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.characters(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
> Source)
>     at 
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
> Source)
>     at javax.xml.parsers.SAXParser.parse(Unknown Source)
>     at 
> org.semanticweb.owlapi.rdf.syntax.RDFParser.parse(RDFParser.java:173)
>     at 
> org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:119)
>     ... 31 more"
> ---------------------------------
>
> *There are up to 1549 errors when opened using Protege 3.4.6. Part of 
> the error message is:*
> "Errors found performing operation.
>
> 1. An error occurred at parsing the OWL ontology
>
> http://purl.obolibrary.org/obo/webService.owl
>
>     at line 550 and column 54.
>     Jena parse error message: {E201} rdf:about not allowed as 
> attribute here.
>     Exception class com.hp.hpl.jena.rdf.arp.impl.XMLHandler$1.  
> Message: {E201} rdf:about not allowed as attribute here.
>
> 2. An error occurred at parsing the OWL ontology
>
> http://purl.obolibrary.org/obo/webService.owl
>
>     at line 551 and column 63.
>     Jena parse error message: {E201} rdf:resource not allowed as 
> attribute here.
>     Exception class com.hp.hpl.jena.rdf.arp.impl.XMLHandler$1.  
> Message: {E201} rdf:resource not allowed as attribute here.
> ....."
> -----------------------------------
>
> Although the export ontology is succeeded, I saw *the error message 
> during the export:*
> "SEVERE: Exception caught -- java.lang.ClassCastException: 
> java.lang.String cannot be cast to 
> edu.stanford.smi.protegex.owl.model.RDFSClass
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.renderer.RDFAxiomRenderer.renderClassAxioms(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.renderer.RDFAxiomRenderer.visitOWLNamedClass(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.model.impl.DefaultOWLNamedClass.accept(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.renderer.RDFAxiomRenderer.write(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.rdfwriter.OWLModelContentWriter.writeContent(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.rdfwriter.RDFXMLDocumentWriter.writeDocument(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.rdfwriter.OWLModelWriter.write(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.writer.rdfxml.rdfwriter.OWLModelAllTripleStoresWriter.write(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.jena.JenaOWLModel.save(Unknown Source)
>         at 
> edu.stanford.smi.protegex.owl.jena.export.JenaExportPlugin.exportProject(Unknown 
> Source)
>         at 
> edu.stanford.smi.protegex.owl.jena.export.JenaExportPlugin.handleExportRequest(Unknown 
> Source)
>         at 
> edu.stanford.smi.protege.ui.ProjectManager.exportProjectRequest(Unknown Source)
>         at 
> edu.stanford.smi.protege.action.ExportPluginAction.actionPerformed(Unknown 
> Source)
>         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
> Source)
>         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
> Source)
>         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>         at javax.swing.AbstractButton.doClick(Unknown Source)
>         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
>         at 
> javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown 
> Source)
>         at java.awt.Component.processMouseEvent(Unknown Source)
>         at javax.swing.JComponent.processMouseEvent(Unknown Source)
>         at java.awt.Component.processEvent(Unknown Source)
>         at java.awt.Container.processEvent(Unknown Source)
>         at java.awt.Component.dispatchEventImpl(Unknown Source)
>         at java.awt.Container.dispatchEventImpl(Unknown Source)
>         at java.awt.Component.dispatchEvent(Unknown Source)
>         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
> Source)
>         at java.awt.LightweightDispatcher.processMouseEvent(Unknown 
> Source)
>         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>         at java.awt.Container.dispatchEventImpl(Unknown Source)
>         at java.awt.Window.dispatchEventImpl(Unknown Source)
>         at java.awt.Component.dispatchEvent(Unknown Source)
>         at java.awt.EventQueue.dispatchEvent(Unknown Source)
>         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown 
> Source)
>         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown 
> Source)
>         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown 
> Source)
>         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>         at java.awt.EventDispatchThread.run(Unknown Source)
>
> ... saving successful.
> WARNING: No ProjectView registered for project obi-webservices-export 
> -- Protege UI.getProjectView()"
> ---------------------------
>
> I attached the exported owl file (webServiceWithNewChanges-export.owl) 
> and the original file stored in the Protege server 
> (webServiceWithNewChanges.owl).
>
> Thanks for your help.
>
> Jie
>
>
> On 6/22/2011 3:26 PM, Tania Tudorache wrote:
>> Hi Jie,
>>
>> I suppose you exported by going to the File menu -> Export and the 
>> selected OWL as a format.
>>
>> I checked the files that you sent, and the exported one is 
>> incomplete. If you open it in a text editor, and scroll at the end of 
>> the file, you will see that the OWL file is cut at some point. This 
>> probably happened if the export process was terminated before the 
>> export actually finished. That is why you get errors when trying to 
>> load it into any of the Proteges.
>>
>> If the export finished successfully, you will get pop-up window 
>> saying that export successful, and the path where it was created.
>>
>> I just made a test with exporting the OPL copy we have on the the 
>> WebProtege server using the same method that you used, and it worked 
>> with no problem.
>>
>> Tania
>>
>>
>> On 06/22/2011 08:34 AM, Jie Zheng wrote:
>>> Hi,
>>>
>>> I am working with WebProtege which both Protege server and Protege 
>>> rich client is Protege 3.4.6. I used Desktop protege to export the 
>>> ontology from the server using "Export to Format' XML. I got error 
>>> message when I open the exported ontology using both Protege 3.4.6 
>>> and Protege 4.1.
>>>
>>> The error message got using Protege 3.4.6:
>>> "Errors found performing operation.
>>>
>>> 1. An error occurred at parsing the OWL ontology
>>>
>>> http://purl.obolibrary.org/obo/opl.owl
>>>
>>>     at line 2045 and column 737.
>>>     Jena parse error message: XML document structures must start and 
>>> end within the same entity.
>>>     Exception class org.xml.sax.SAXParseException.  Message: XML 
>>> document structures must start and end within the same entity.
>>>
>>> See console and log for more details."
>>>
>>> The error message got using Protege 4.1:
>>> "Export ontology using Protege, export format as XML, when open 
>>> using Protege 4.1 got following error
>>>
>>> org.xml.sax.SAXParseException: XML document structures must start 
>>> and end within the same entity.
>>>
>>>
>>> Full Stack Trace
>>> ----------------------------------------------------------------------------------------- 
>>>
>>>
>>> org.coode.owlapi.rdfxml.parser.OWLRDFXMLParserSAXException: 
>>> org.xml.sax.SAXParseException: XML document structures must start 
>>> and end within the same entity.
>>>     at 
>>> org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:129) 
>>>
>>>     at 
>>> uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:204)
>>>     at 
>>> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:725)
>>>     at 
>>> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:682)
>>>     at 
>>> org.protege.editor.owl.model.OWLModelManagerImpl.loadOntologyFromPhysicalURI(OWLModelManagerImpl.java:317)
>>>     at 
>>> org.protege.editor.owl.OWLEditorKit.handleLoadFrom(OWLEditorKit.java:180)
>>>     at 
>>> org.protege.editor.owl.OWLEditorKit.handleLoadRequest(OWLEditorKit.java:174)
>>>     at 
>>> org.protege.editor.core.ProtegeManager.openAndSetupEditorKit(ProtegeManager.java:157)
>>>     at 
>>> org.protege.editor.core.ProtegeWelcomeFrame$ProtegeWelcomePanel$2.actionPerformed(ProtegeWelcomeFrame.java:139)
>>>     at 
>>> org.protege.editor.core.ui.util.LinkLabel.activateLink(LinkLabel.java:102)
>>>     at 
>>> org.protege.editor.core.ui.util.LinkLabel.access$100(LinkLabel.java:30)
>>>     at 
>>> org.protege.editor.core.ui.util.LinkLabel$1.mouseReleased(LinkLabel.java:68)
>>>     at java.awt.Component.processMouseEvent(Unknown Source)
>>>     at javax.swing.JComponent.processMouseEvent(Unknown Source)
>>>     at java.awt.Component.processEvent(Unknown Source)
>>>     at java.awt.Container.processEvent(Unknown Source)
>>>     at java.awt.Component.dispatchEventImpl(Unknown Source)
>>>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>     at java.awt.Component.dispatchEvent(Unknown Source)
>>>     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown 
>>> Source)
>>>     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>>>     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>>>     at java.awt.Container.dispatchEventImpl(Unknown Source)
>>>     at java.awt.Window.dispatchEventImpl(Unknown Source)
>>>     at java.awt.Component.dispatchEvent(Unknown Source)
>>>     at java.awt.EventQueue.dispatchEvent(Unknown Source)
>>>     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown 
>>> Source)
>>>     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>>>     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown 
>>> Source)
>>>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>>>     at java.awt.EventDispatchThread.run(Unknown Source)
>>> Caused by: org.xml.sax.SAXParseException: XML document structures 
>>> must start and end within the same entity.
>>>     at 
>>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.endEntity(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source) 
>>>
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.peekChar(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
>>> Source)
>>>     at 
>>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
>>> Source)
>>>     at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>     at 
>>> org.semanticweb.owlapi.rdf.syntax.RDFParser.parse(RDFParser.java:173)
>>>     at 
>>> org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:119) 
>>>
>>>     ... 31 more"
>>>
>>> I attached the exported owl file (opl_inferred_export.owl) and the 
>>> original file stored in the Protege server (opl_inferred_server.owl).
>>>
>>> Any idea of why it happen? Is it a bug of protege or did I do 
>>> something wrong?
>>>
>>> Thanks,
>>>
>>> Jie
>>>
>>>
>>> _______________________________________________
>>> protege-discussion mailing list
>>> protege-discussion at lists.stanford.edu
>>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>>
>>> Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>>
>>
>> _______________________________________________
>> protege-discussion mailing list
>> protege-discussion at lists.stanford.edu
>> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>>
>> Instructions for unsubscribing:http://protege.stanford.edu/doc/faq.html#01a.03
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20110624/3327524e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: moz-screenshot.png
Type: image/png
Size: 36742 bytes
Desc: not available
URL: <http://mailman.stanford.edu/pipermail/protege-discussion/attachments/20110624/3327524e/attachment.png>


More information about the protege-discussion mailing list