protegeproject / sparql-query-plugin

Protege Desktop plug-in that provides support for writing and executing SPARQL queries.
12 stars 11 forks source link

SPARQL Plugin throws exception when certain ontology is loaded #10

Closed csnyulas closed 7 years ago

csnyulas commented 7 years ago

If we load the demo ontology, used at the short course, for the SPARQL demo, we get this exception:

Uncaught Exception in thread 'AWT-EventQueue-0' 
java.lang.NoSuchMethodError: org.semanticweb.owlapi.rdf.model.AbstractTranslator.<init>(Lorg/semanticweb/owlapi/model/OWLOntologyManager;Lorg/semanticweb/owlapi/model/OWLOntology;ZLorg/semanticweb/owlapi/util/IndividualAppearance;)V
    at org.protege.owl.rdf.impl.RDFTranslator.<init>(RDFTranslator.java:91) ~[na:na]
    at org.protege.owl.rdf.impl.RDFTranslator.translate(RDFTranslator.java:53) ~[na:na]
    at org.protege.owl.rdf.impl.OwlTripleStoreImpl.addAxiom(OwlTripleStoreImpl.java:99) ~[na:na]
    at org.protege.owl.rdf.Utilities.loadOwlTripleStore(Utilities.java:48) ~[na:na]
    at org.protege.owl.rdf.Utilities.getOwlTripleStore(Utilities.java:32) ~[na:na]
    at org.protege.editor.owl.rdf.repository.BasicSparqlReasoner.precalculate(BasicSparqlReasoner.java:54) ~[na:na]
    at org.protege.editor.owl.rdf.SparqlQueryView.initializeReasoner(SparqlQueryView.java:44) ~[na:na]
    at org.protege.editor.owl.rdf.SparqlQueryView.initialiseOWLView(SparqlQueryView.java:34) ~[na:na]
    at org.protege.editor.owl.ui.view.AbstractOWLViewComponent.initialise(AbstractOWLViewComponent.java:43) ~[na:na]
    at org.protege.editor.core.ui.view.View.createContent(View.java:413) ~[na:na]
    at org.protege.editor.core.ui.view.View.createUI(View.java:220) ~[na:na]
    at org.protege.editor.core.ui.view.View$1.hierarchyChanged(View.java:124) ~[na:na]
    at java.awt.Component.processHierarchyEvent(Component.java:6692) ~[na:1.8.0_40]
    at java.awt.Component.processEvent(Component.java:6311) ~[na:1.8.0_40]
    at java.awt.Container.processEvent(Container.java:2234) ~[na:1.8.0_40]
    at java.awt.Component.dispatchEventImpl(Component.java:4881) ~[na:1.8.0_40]
    at java.awt.Container.dispatchEventImpl(Container.java:2292) ~[na:1.8.0_40]
    at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
    at java.awt.Component.createHierarchyEvents(Component.java:5541) ~[na:1.8.0_40]
    at java.awt.Container.createHierarchyEvents(Container.java:1443) ~[na:1.8.0_40]
    at java.awt.Component.show(Component.java:1622) ~[na:1.8.0_40]
    at java.awt.Component.show(Component.java:1654) ~[na:1.8.0_40]
    at java.awt.Component.setVisible(Component.java:1606) ~[na:1.8.0_40]
    at javax.swing.JComponent.setVisible(JComponent.java:2644) ~[na:1.8.0_40]
    at javax.swing.JTabbedPane.fireStateChanged(JTabbedPane.java:394) ~[na:1.8.0_40]
    at javax.swing.JTabbedPane$ModelListener.stateChanged(JTabbedPane.java:270) ~[na:1.8.0_40]
    at javax.swing.DefaultSingleSelectionModel.fireStateChanged(DefaultSingleSelectionModel.java:132) ~[na:1.8.0_40]
    at javax.swing.DefaultSingleSelectionModel.setSelectedIndex(DefaultSingleSelectionModel.java:67) ~[na:1.8.0_40]
    at javax.swing.JTabbedPane.setSelectedIndexImpl(JTabbedPane.java:616) ~[na:1.8.0_40]
    at javax.swing.JTabbedPane.setSelectedIndex(JTabbedPane.java:591) ~[na:1.8.0_40]
    at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.mousePressed(BasicTabbedPaneUI.java:3647) ~[na:1.8.0_40]
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280) ~[na:1.8.0_40]
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) ~[na:1.8.0_40]
    at java.awt.Component.processMouseEvent(Component.java:6522) ~[na:1.8.0_40]
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) ~[na:1.8.0_40]
    at java.awt.Component.processEvent(Component.java:6290) ~[na:1.8.0_40]
    at java.awt.Container.processEvent(Container.java:2234) ~[na:1.8.0_40]
    at java.awt.Component.dispatchEventImpl(Component.java:4881) ~[na:1.8.0_40]
    at java.awt.Container.dispatchEventImpl(Container.java:2292) ~[na:1.8.0_40]
    at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) ~[na:1.8.0_40]
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4530) ~[na:1.8.0_40]
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) ~[na:1.8.0_40]
    at java.awt.Container.dispatchEventImpl(Container.java:2278) ~[na:1.8.0_40]
    at java.awt.Window.dispatchEventImpl(Window.java:2750) ~[na:1.8.0_40]
    at java.awt.Component.dispatchEvent(Component.java:4703) ~[na:1.8.0_40]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751) ~[na:1.8.0_40]
    at java.awt.EventQueue.access$500(EventQueue.java:97) ~[na:1.8.0_40]
    at java.awt.EventQueue$3.run(EventQueue.java:702) ~[na:1.8.0_40]
    at java.awt.EventQueue$3.run(EventQueue.java:696) ~[na:1.8.0_40]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_40]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) ~[na:1.8.0_40]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) ~[na:1.8.0_40]
    at java.awt.EventQueue$4.run(EventQueue.java:724) ~[na:1.8.0_40]
    at java.awt.EventQueue$4.run(EventQueue.java:722) ~[na:1.8.0_40]
    at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_40]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) ~[na:1.8.0_40]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:721) ~[na:1.8.0_40]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [na:1.8.0_40]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [na:1.8.0_40]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [na:1.8.0_40]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [na:1.8.0_40]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [na:1.8.0_40]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [na:1.8.0_40]
csnyulas commented 7 years ago

Happens in v2.0.1, which is bundled with Protege 5.2.

rsgoncalves commented 7 years ago

Porting this issue to rdf-library repo: https://github.com/protegeproject/rdf-library/issues/4.

csnyulas commented 7 years ago

This has been fixed with new release of rdf-library and sparql-query-plugin.

To get the fix update the the "OWLAPI RDF Library" and "Protege SPARQL Plugin" to the latest version with the auto-update mechanism (which appears when starting up Protege or can be activated through the File -> Check for plugins... menu):

protege_update_sparql_plugin_to_v2 0 3

anapatriciagh commented 6 years ago

I had the same problem, I applied that solution and it worked! Thanks : )