5 Replies Latest reply on Jun 27, 2016 5:40 PM by alwu-Oracle

    Plug-in causing exceptions in Protégé

    jaccoud

      Greetings,

       

      After installing the Oracle Protégé plug-in, I noticed 2 problems when editing my ontologies, which have several owl:imports for upper ontologies.

       

      1) A spurious wanna-be XML catalog file was created in the imported ontologies folder (see file catalog-v001.xml.removed at the end of the post, could find a way to attach a file to the post). Because of the filestamp, looks like this file, which is not well-formed XML (standalone=no and all IDs are invalid), was created by the plug-in. Because it is malformed, keeping this catalog there causes a lot of parsing problems, so I had to remove it manually.

       

      2) Every time I change ontologies, I get a NPE from the plug-in, even after deleting the malformed XML catalog:

       

      Error 1 Logged at Mon May 30 11:27:42 BRT 2016

      NullPointerException: null

          org.protege.editor.owl.model.library.folder.FolderGroupManager.examineDiskEntries(FolderGroupManager.java:266)

          org.protege.editor.owl.model.library.folder.FolderGroupManager.examineDiskEntries(FolderGroupManager.java:294)

          org.protege.editor.owl.model.library.folder.FolderGroupManager.update(FolderGroupManager.java:146)

          org.protege.editor.owl.model.library.OntologyCatalogManager.update(OntologyCatalogManager.java:159)

          org.protege.editor.owl.model.library.OntologyCatalogManager.ensureCatalogExists(OntologyCatalogManager.java:116)

          org.protege.editor.owl.model.library.OntologyCatalogManager.addFolder(OntologyCatalogManager.java:189)

          oracle.spatial.rdf.client.jena.protege.plugin.CatalogListener.reloadCatalog(CatalogListener.java:142)

          oracle.spatial.rdf.client.jena.protege.plugin.CatalogListener.checkCatalog(CatalogListener.java:246)

          oracle.spatial.rdf.client.jena.protege.plugin.CatalogListener.run(CatalogListener.java:275)

       

      This is probably caused by the missing pseudocatalog.

       

      Any ideas on getting these right? This kind of stuff (autogenerated catalogs) should be documented, specially when it generates unparseable trash.

       

      Sincerely,

      Marcelo Amaral

      (Petrobrás - IT Architecture Group)

       

      ===========catalog-v001.xml.removed=================

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>

      <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

          <group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base="">

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/CommonSenseMapping.owl" uri="CommonSenseMapping.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/DLP_397.owl" uri="DLP_397.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/DOLCE-Lite.owl" uri="DOLCE-Lite.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/ExtendedDnS.owl" uri="ExtendedDnS.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/FunctionalParticipation.owl" uri="FunctionalParticipation.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/InformationObjects.owl" uri="InformationObjects.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/ModalDescriptions.owl" uri="ModalDescriptions.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/Plans.owl" uri="Plans.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/SocialUnits.owl" uri="SocialUnits.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/SpatialRelations.owl" uri="SpatialRelations.owl"/>

              <uri id="Automatically generated entry, Timestamp=1462205560948" name="http://www.loa-cnr.it/ontologies/TemporalRelations.owl" uri="TemporalRelations.owl"/>

          </group>

      </catalog>

        • 1. Re: Plug-in causing exceptions in Protégé
          alwu-Oracle

          Hi Marcelo,

           

          Let me gather some basic information. Which version of Protege and which version of the Protege plugin were you using?

           

          The XML catalog file is meant to be created by Protege (not by Protege plugin). It is strange that the XML file created in your system was not a valid one. What were the steps you used to perform the import?

           

          Thanks,


          Zhe Wu

          • 2. Re: Plug-in causing exceptions in Protégé
            jaccoud

            Well,

             

            I'm using Protégé 4.3, which is the only version supported by the Oracle plug-in, as per documentation. BTW, Protégé 5 was released recently, do you know when a compatible plug-in will follow?

             

            Versions are as such:

            Starting Protege 4 OWL Editor (Version 4.3.0, Build = 304)

            Platform:

                Java: JVM 1.7.0_80-b15 Memory: 466M

                Language: pt, Country: BR

                Framework: Apache Software Foundation (1.5)

                OS: windows7 (6.1)

                Processor: x86-64

            Plugin: Cajun Visualization Plugin (1.0.0.2013_04_15_0104)

            Plugin: Oracle Plugin (2.0.0.2014_02_24_2200)

            Plugin: OWLDoc (2.0.0)

            Plugin: Dlquery (1.1.0.2013_04_15_0104)

            Plugin: OWLViz (4.1.2.2013_04_15_0103)

            Plugin: Protege OWL Code Generation (1.1.0.2013_04_15_0104)

            Plugin: OWL Diff Tool (1.0.0.2013_04_15_0104)

            Plugin: The Protege 4 OWL Editor (4.3.0.b304_2013_04_15_0103)

            Plugin: Protege SPARQL Plugin (1.0.0.2013_04_15_0104)

            Plugin: Explanation Workbench (1.0.0.2013_04_15_0104)

            Plugin: OntoGraf Plug-in (1.0.1.2013_04_15_0104)

            Plugin: OWL Diff Library (1.0.0.2013_04_15_0104)

            Plugin: OWLAPI-RDF Library (1.0.0.2013_04_15_0104)

            Plugin: HermiT Reasoner (1.3.7)

            Plugin: The OWL API (3.4.2.2012_12_05)

            Plugin: Factplusplus Plug-in (1.6.2)

             

            I tried to remove the import and then re-import it (the single main direct import results in multiple indirect imports, all in the same folder). Still getting exceptions from the Oracle plug-in:

             

            Error 1 Logged at Thu Jun 02 11:14:19 BRT 2016

            NullPointerException: null

                org.protege.editor.owl.model.library.folder.FolderGroupManager.examineDiskEntries(FolderGroupManager.java:266)

                org.protege.editor.owl.model.library.folder.FolderGroupManager.examineDiskEntries(FolderGroupManager.java:294)

                org.protege.editor.owl.model.library.folder.FolderGroupManager.update(FolderGroupManager.java:146)

                org.protege.editor.owl.model.library.OntologyCatalogManager.update(OntologyCatalogManager.java:159)

                org.protege.editor.owl.model.library.OntologyCatalogManager.ensureCatalogExists(OntologyCatalogManager.java:116)

                org.protege.editor.owl.model.library.OntologyCatalogManager.addFolder(OntologyCatalogManager.java:189)

                oracle.spatial.rdf.client.jena.protege.PluginOracle.reloadCatalog(PluginOracle.java:165)

                oracle.spatial.rdf.client.jena.protege.PluginFactory.startOraclePlugin(PluginFactory.java:486)

                oracle.spatial.rdf.client.jena.protege.PluginFactory.createPluginBundle(PluginFactory.java:209)

                oracle.spatial.rdf.client.jena.protege.MenuOptionSave.initialise(MenuOptionSave.java:70)

                org.protege.editor.core.ui.menu.MenuActionPluginJPFImpl.newInstance(MenuActionPluginJPFImpl.java:169)

                org.protege.editor.core.ui.menu.MenuActionPluginJPFImpl.newInstance(MenuActionPluginJPFImpl.java:31)

                org.protege.editor.core.ui.menu.MenuBuilder.buildInnerMenu(MenuBuilder.java:140)

                org.protege.editor.core.ui.menu.MenuBuilder.addMenu(MenuBuilder.java:95)

                org.protege.editor.core.ui.menu.MenuBuilder.buildCompositeMenu(MenuBuilder.java:115)

                org.protege.editor.core.ui.menu.MenuBuilder.addMenu(MenuBuilder.java:89)

                org.protege.editor.core.ui.menu.MenuBuilder.buildMenu(MenuBuilder.java:78)

                org.protege.editor.core.ui.workspace.WorkspaceFrame.createMenuBar(WorkspaceFrame.java:174)

                org.protege.editor.core.ui.workspace.WorkspaceFrame.createUI(WorkspaceFrame.java:144)

                org.protege.editor.core.ui.workspace.WorkspaceFrame.<init>(WorkspaceFrame.java:62)

                org.protege.editor.core.ui.workspace.WorkspaceManager.addWorkspace(WorkspaceManager.java:44)

                org.protege.editor.core.editorkit.EditorKitManager.addEditorKit(EditorKitManager.java:44)

                org.protege.editor.core.ProtegeManager.openAndSetupRecentEditorKit(ProtegeManager.java:230)

                org.protege.editor.core.ui.action.OpenRecentAction$RecentEditorKitAction.openInNewWorkspace(OpenRecentAction.java:92)

                org.protege.editor.core.ui.util.UIUtil.openRequest(UIUtil.java:216)

                org.protege.editor.core.ui.action.OpenRecentAction$RecentEditorKitAction.actionPerformed(OpenRecentAction.java:78)

                javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

                javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

                javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

                javax.swing.DefaultButtonModel.setPressed(Unknown Source)

                javax.swing.AbstractButton.doClick(Unknown Source)

                javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)

                javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)

                java.awt.Component.processMouseEvent(Unknown Source)

                javax.swing.JComponent.processMouseEvent(Unknown Source)

                java.awt.Component.processEvent(Unknown Source)

                java.awt.Container.processEvent(Unknown Source)

                java.awt.Component.dispatchEventImpl(Unknown Source)

                java.awt.Container.dispatchEventImpl(Unknown Source)

                java.awt.Component.dispatchEvent(Unknown Source)

                java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

                java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

                java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

                java.awt.Container.dispatchEventImpl(Unknown Source)

                java.awt.Window.dispatchEventImpl(Unknown Source)

                java.awt.Component.dispatchEvent(Unknown Source)

                java.awt.EventQueue.dispatchEventImpl(Unknown Source)

                java.awt.EventQueue.access$300(Unknown Source)

                java.awt.EventQueue$3.run(Unknown Source)

                java.awt.EventQueue$3.run(Unknown Source)

                java.security.AccessController.doPrivileged(Native Method)

                java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

                java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

                java.awt.EventQueue$4.run(Unknown Source)

                java.awt.EventQueue$4.run(Unknown Source)

                java.security.AccessController.doPrivileged(Native Method)

                java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

                java.awt.EventQueue.dispatchEvent(Unknown Source)

                java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

                java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

                java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

                java.awt.EventDispatchThread.pumpEvents(Unknown Source)

                java.awt.EventDispatchThread.pumpEvents(Unknown Source)

                java.awt.EventDispatchThread.run(Unknown Source)

            ---------------------------------------------------------------------------------------------------

             

            You are correct, Protégé creates a catalog on the project folder and is named catalog-v001.xml . There should NOT be another catalog in the subfolder.  Its contents are:

             

            <?xml version="1.0" encoding="UTF-8" standalone="no"?>

            <catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

                <group id="Folder Repository, directory=, recursive=true, Auto-Update=true, version=2" prefer="public" xml:base="">

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://cos.ontoware.org/cosc" uri="CSO/cosc.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://cos.ontoware.org/cows" uri="CSO/cows.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://cos.ontoware.org/cso" uri="CSO/cso.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://kaon.semanticweb.org/server" uri="CSO/server.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="duplicate:http://onto.petrobras.biz/2013/tic/optic" uri="app-gloss.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="duplicate:http://onto.petrobras.biz/2013/tic/optic" uri="tic.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="duplicate:http://onto.petrobras.biz/2013/tic/optic" uri="tic2.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://purl.obolibrary.org/obo/bfo.owl" uri="BFO/bfo.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/change-couplings.owl" uri="SEON/change-couplings.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/clones.owl" uri="SEON/clones.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/code-flaws.owl" uri="SEON/code-flaws.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/fine-grained-changes.owl" uri="SEON/fine-grained-changes.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/integration-code-history.owl" uri="SEON/integration-code-history.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/integration-history-issues-code.owl" uri="SEON/integration-history-issues-code.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/integration-history-issues.owl" uri="SEON/integration-history-issues.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/issues-bugzilla.owl" uri="SEON/bugzilla.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-spanning/2012/02/issues-jira.owl" uri="SEON/jira.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-specific/2012/02/code-metrics.owl" uri="SEON/code-metrics.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-specific/2012/02/code.owl" uri="SEON/code.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-specific/2012/02/history.owl" uri="SEON/history.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/domain-specific/2012/02/issues.owl" uri="SEON/issues.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/general/2012/02/annotations.owl" uri="SEON/annotations.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/general/2012/02/measurement.owl" uri="SEON/measurement.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/general/2012/2/main.owl" uri="SEON/main.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/nl/2012/02/annotations-nl.owl" uri="SEON/annotations-nl.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/nl/2012/02/code-nl.owl" uri="SEON/code-nl.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://se-on.org/ontologies/system-specific/2012/02/java.owl" uri="SEON/java.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://swrc.ontoware.org/ontology-07" uri="SWRC/swrc_updated_v0.7.1.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://swrc.ontoware.org/ontology/portal#" uri="SWRC/semiport.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.ebi.ac.uk/efo/swo/" uri="material/softwareontology.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.ifi.unizh.ch/ddis/evoont/2008/11/som#" uri="material/som.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.ifi.uzh.ch/ddis/evoont/2008/11/bom" uri="material/bom.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.ifi.uzh.ch/ddis/evoont/2008/11/vom" uri="material/vom.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/CommonSenseMapping.owl" uri="DLP3971/CommonSenseMapping.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/DLP_397.owl" uri="DLP3971/DLP_397.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/DOLCE-Lite.owl" uri="DLP3971/DOLCE-Lite.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/ExtendedDnS.owl" uri="DLP3971/ExtendedDnS.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/FunctionalParticipation.owl" uri="DLP3971/FunctionalParticipation.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/InformationObjects.owl" uri="DLP3971/InformationObjects.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/ModalDescriptions.owl" uri="DLP3971/ModalDescriptions.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/Plans.owl" uri="DLP3971/Plans.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/SocialUnits.owl" uri="DLP3971/SocialUnits.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/SpatialRelations.owl" uri="DLP3971/SpatialRelations.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.loa-cnr.it/ontologies/TemporalRelations.owl" uri="DLP3971/TemporalRelations.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.onto-med.de/ontologies/gfo-basic.owl" uri="GFO/gfo-basic.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.onto-med.de/ontologies/gfo.owl" uri="GFO/gfo.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.ontologydesignpatterns.org/ont/dul/DUL.owl" uri="DUL/DUL.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.owl-ontologies.com/unnamed.owl" uri="SWRC/swrc-swtopics_v0.3.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="http://www.semanticweb.org/ontologies/2010/01/core-soa.owl" uri="the.open.group/soa.owl"/>

                    <uri id="Automatically generated entry, Timestamp=1464876856198" name="shadowed:http://cos.ontoware.org/cosc" uri="COSC/cosc.owl"/>

                </group>

            </catalog>

             

             

            If I delete the catalog and opens Protégé, it loads without problems. When I open my ontology, it also loads correctly and the catalog is recreated by Protégé without throwing exceptions. The I close Protégé, reopen it and all is fine. I load several different ontologies, and still fine. Only when I try to open my ontology an exception is thrown.

            I suspect this is caused by the fact that the owl file was renamed. If you copy MyOntology.owl to MyOntology-2.owl (it is common during development to have several versions of a file) an try to open MyOntology-2.owl, the exception is thrown. Protégé doesn't mind, and it updates the catalog, but the plug-in does not behave well.

             

            I'll go around this problem by moving the files to different folders without renaming them, but this is surely something that should not be happening, since there is nothing wrong with renaming an OWL file.

             

            Can you give me some feedback?

             

            Thanks in advance.

             

            Marcelo Amaral

            Petrobrás

            • 3. Re: Plug-in causing exceptions in Protégé
              alwu-Oracle

              Thanks very much for sharing the steps. I will see if I can reproduce with renaming an OWL file. It seems to be a very reasonable action.

               

              Regarding newer versions of the Protégé plugin, we are getting very close to release a newer version of the plugin for Protégé 4.3. I will post an announcement once it becomes available for download. Internally,  we already have a version that works well with Protégé 5. It is in the pipeline.

               

              Zhe Wu

              • 4. Re: Plug-in causing exceptions in Protégé
                alwu-Oracle

                We have reproduced your problem on both Linux and Windows platforms. On Linux, we could see the exception but Protege continued to function. On Windows, Protege's behavior was worse. The good news is the newer version of the plugin will contain a fix for your problem.

                 

                Thanks,

                 

                Zhe Wu

                • 5. Re: Plug-in causing exceptions in Protégé
                  alwu-Oracle

                  Hi,

                   

                  We just released a newer version of Apache Jena support (formerly known as Jena Adapter) which has the latest support for Protege Desktop 4.3.

                   

                  https://community.oracle.com/thread/3944516

                   

                  Please give it a try and let us know if your problem goes away. To manage different versions of ontologies that have the same ontology ID, we recommend a use of sibling directories (as opposed to parent-child directories) to store those ontologies.

                   

                  Thanks,

                   

                  Zhe Wu