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] Loading .jar libraries in Protege issue(?)

Jan Zemánek jan.zemanek at deri.org
Tue Aug 21 11:03:28 PDT 2007


Hi all,

I'm developing a tab plugin for Protege-OWL (3.3 Build 418) and I've run 
into some issues regarding .jar libraries used by my plugin. I have a 
code that makes use of Sesame (2.0 beta4) .jar libraries and runs 
smoothly as long as it is in a "stand-alone class" but as soon as I put 
the same code in my plugin and try to run it within Protege I get the 
following exception (the full stack trace [1] is enclosed at the end of 
this e-mail):

Exception in thread "AWT-EventQueue-0"
org.openrdf.query.UnsupportedQueryLanguageException: No factory
available for query language SPARQL

So it seems that Protege cannot find the SPARQL factory class which is
strange because all the Sesame .jar libraries are situated in my plugin
directory in the main plugins directory of Protege and thus should be
implicitly loaded by Protege, right? If so what do I wrong?

The SPARQL factory can be found in
openrdf-queryparser-sparql-2.0-beta4.jar library which is present in my 
plugin directory as shown here:

c:\dev\protege\plugins\sw.semversion.manager

21.08.2007  16:38    <DIR>          .
21.08.2007  16:38    <DIR>          ..
19.04.2005  12:38            88˙441 aduna-clustermap-2005.1-resources.jar
19.04.2005  12:39           490˙048 aduna-clustermap-2005.1.jar
18.06.2007  13:48            31˙949 aduna-collections-1.1.jar
18.06.2007  13:48            10˙968 aduna-concurrent-1.1.jar
18.06.2007  13:48            18˙021 aduna-io-1.1.jar
18.06.2007  13:48            21˙263 aduna-iteration-1.1.jar
18.06.2007  13:48             8˙587 aduna-lang-1.2.jar
18.06.2007  13:48            16˙234 aduna-net-1.1.jar
18.06.2007  13:48            13˙544 aduna-text-1.1.jar
18.06.2007  13:47            25˙281 aduna-xml-1.1.jar
18.06.2007  13:44           435˙563 antlr-2.7.5.jar
18.06.2007  13:44           820˙199 arq-1.4.jar
18.06.2007  13:48            83˙613 commons-io-1.3.1.jar
18.06.2007  13:44            38˙015 commons-logging-1.0.4.jar
18.06.2007  13:43           189˙284 concurrent-1.3.4.jar
21.08.2007  16:38                 0 dir.txt
14.08.2007  14:47    <DIR>          doc
16.08.2007  13:14    <DIR>          icons
18.06.2007  13:44         3˙233˙439 icu4j-3.4.4.jar
18.06.2007  13:44           188˙729 iri-2.4.jar
18.06.2007  13:44         2˙330˙172 jena-2.4.jar
18.06.2007  13:48           367˙444 log4j-1.2.14.jar
19.08.2007  23:35    <DIR>          meta-inf
18.06.2007  13:48            47˙786 openrdf-model-2.0-beta4.jar
18.06.2007  13:48            22˙597 openrdf-query-2.0-beta4.jar
18.06.2007  13:48            51˙817
openrdf-queryalgebra-evaluation-2.0-beta4.jar
18.06.2007  13:48            70˙376 openrdf-queryalgebra-model-2.0-beta4.jar
18.06.2007  13:48             7˙227 openrdf-queryparser-api-2.0-beta4.jar
18.06.2007  13:48           141˙083 openrdf-queryparser-serql-2.0-beta4.jar
18.06.2007  13:48           128˙747 openrdf-queryparser-sparql-2.0-beta4.jar
18.06.2007  13:48            12˙534 openrdf-queryresultio-api-2.0-beta4.jar
18.06.2007  14:55            30˙413 openrdf-rdf2go-2.0-beta4hack.jar
18.06.2007  13:48            53˙184 openrdf-repository-api-2.0-beta4.jar
18.06.2007  13:48            18˙227 openrdf-repository-sail-2.0-beta4.jar
18.06.2007  13:48            19˙657 openrdf-rio-api-2.0-beta4.jar
18.06.2007  13:48             5˙062 openrdf-rio-n3-2.0-beta4.jar
18.06.2007  13:48            13˙519 openrdf-rio-ntriples-2.0-beta4.jar
18.06.2007  13:48            33˙243 openrdf-rio-rdfxml-2.0-beta4.jar
18.06.2007  13:48            11˙258 openrdf-rio-trix-2.0-beta4.jar
18.06.2007  13:47            17˙237 openrdf-rio-turtle-2.0-beta4.jar
18.06.2007  13:48            25˙922 openrdf-sail-api-2.0-beta4.jar
18.06.2007  13:47            13˙106 openrdf-sail-inferencer-2.0-beta4.jar
18.06.2007  13:48            57˙468 openrdf-sail-memory-2.0-beta4.jar
18.06.2007  13:48            79˙406 openrdf-sail-nativerdf-2.0-beta4.jar
18.06.2007  13:43           850˙526 osgi-3.2.1.R32.jar
21.08.2007  12:45               242 plugin.properties
27.06.2007  16:33            41˙859 rdf2go.api-4.4.6.jar
04.08.2007  02:24            75˙916 rdf2go.impl.base-4.4.7-SNAPSHOT.jar
28.06.2007  01:12            43˙601 rdf2go.impl.base.test-4.4.6.jar
28.06.2007  01:17            28˙762 rdf2go.impl.jena24-4.4.6.jar
06.07.2007  14:06            41˙134 rdfreactor.generator-4.4.8.jar
01.08.2007  16:31           106˙748 rdfreactor.runtime-4.4.10-SNAPSHOT.jar
04.08.2007  03:04            57˙825 semversion-1.0.0-SNAPSHOT.jar
10.03.2006  00:05                84 semversion.properties
18.06.2007  13:44            12˙115 slf4j-api-1.3.0.jar
18.06.2007  13:44             6˙946 slf4j-log4j12-1.3.0.jar
18.06.2007  13:43            26˙514 stax-api-1.0.1.jar
20.08.2007  12:09    <DIR>          storage
16.08.2007  13:14    <DIR>          sw
18.06.2007  13:49           361˙173 velocity-1.4.jar
18.06.2007  13:49           517˙761 velocity-dep-1.4.jar
15.08.2007  18:47    <DIR>          versions
18.06.2007  13:44           483˙266 wstx-lgpl-3.1.1.jar
18.06.2007  13:43         1˙203˙860 xercesImpl-2.7.1.jar
18.06.2007  13:43           194˙205 xml-apis-1.3.02.jar

I even tried to put all the Sesame related .jar libraries on Protege 
classpath (in Protege.lax file) but I just ended up with another
"not found" exception though the class OpenRDFException is present in 
the openrdf-model-2.0-beta4.jar as well (the full stack trace [2] can be 
found at the end of the e-mail):

Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: org/openrdf/OpenRDFException

There shouldn't be a collision between different versions of some of the 
Sesame libraries leaded as I use no other plugins utilizing Sesame:

c:\dev\protege\plugins

21.08.2007  19:51    <DIR>          .
21.08.2007  19:51    <DIR>          ..
19.07.2007  12:25    <DIR>          ca.uvic.cs.chisel.jambalaya
19.07.2007  12:25    <DIR>          dfki.protege.ontoviz
21.08.2007  19:51                 0 dir.txt
19.07.2007  12:25    <DIR>          edu.stanford.smi.protege.collab
19.07.2007  12:25    <DIR>          edu.stanford.smi.protege.script
19.07.2007  12:25    <DIR>          edu.stanford.smi.protege.stringsearch
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.changes
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.chatPlugin
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.datamaster
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.ezpal
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.facets_tab
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.instance_tree
19.07.2007  16:48    <DIR>          edu.stanford.smi.protegex.owl
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.pal_tabs
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.prompt
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.rdf_backend
03.08.2007  19:17    <DIR> 
edu.stanford.smi.protegex.standard_extensions
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.wordnet
19.07.2007  12:25    <DIR>          edu.stanford.smi.protegex.xml_tab
19.07.2007  12:25    <DIR>          org.algernon
19.07.2007  12:25    <DIR>          se.liu.ida.JessTab
21.08.2007  16:38    <DIR>          sw.semversion.manager
19.07.2007  12:25    <DIR>          uk.ac.iam.soton.akt.tgviztab
19.07.2007  12:25    <DIR>          uk.ac.man.cs.mig.coode.debugger
19.07.2007  12:25    <DIR> 
uk.ac.man.cs.mig.coode.manchesterowlsyntaxeditor
19.07.2007  12:25    <DIR>          uk.ac.man.cs.mig.coode.owldoc
19.07.2007  12:25    <DIR>          uk.ac.man.cs.mig.coode.owlindividualstab
19.07.2007  12:25    <DIR>          uk.ac.man.cs.mig.coode.owlviz
19.07.2007  12:37    <DIR>          uk.ac.man.cs.mig.coode.protege.wizard
19.07.2007  12:25    <DIR> 
uk.ac.man.cs.mig.coode.protege.wizard.owl

As I got stuck on this I would really appreciate any help.

Kind regards,
Jan

[1] The first full stack trace:

Exception in thread "AWT-EventQueue-0" 
org.openrdf.query.UnsupportedQueryLanguag
eException: No factory available for query language SPARQL
         at 
org.openrdf.query.parser.QueryParserUtil.createParser(QueryParserUtil
.java:37)
         at 
org.openrdf.query.parser.QueryParserUtil.parseQuery(QueryParserUtil.j
ava:60)
         at 
org.openrdf.query.parser.QueryParserUtil.parseTupleQuery(QueryParserU
til.java:82)
         at 
org.openrdf.repository.sail.SailRepositoryConnection.prepareTupleQuer
y(SailRepositoryConnection.java:130)
         at 
org.openrdf.repository.base.RepositoryConnectionBase.prepareTupleQuer
y(RepositoryConnectionBase.java:135)
         at 
org.openrdf.rdf2go.RepositoryQueryResultTable.<init>(RepositoryQueryR
esultTable.java:40)
         at 
org.openrdf.rdf2go.RepositoryQueryResultTable.<init>(RepositoryQueryR
esultTable.java:32)
         at 
org.openrdf.rdf2go.RepositoryModel.sparqlSelect(RepositoryModel.java:
261)
         at 
org.ontoware.rdfreactor.runtime.Bridge.getSparqlSelectSingleVariable(
Bridge.java:236)
         at 
org.ontoware.semversion.impl.SemVersionImpl.getUser(SemVersionImpl.ja
va:136)
         at org.ontoware.semversion.SemVersion.login(SemVersion.java:61)
         at 
sw.semversion.manager.main.VersionManagerTab.connect(VersionManagerTa
b.java:153)
         at 
sw.semversion.manager.main.VersionManagerTab.connectButtonAction(Vers
ionManagerTab.java:128)
         at 
sw.semversion.manager.main.VersionManagerTab.access$0(VersionManagerT
ab.java:124)
         at 
sw.semversion.manager.main.VersionManagerTab$1.actionPerformed(Versio
nManagerTab.java:91)
         at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
49)
         at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
         at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
         at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
)
         at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
         at 
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
31)
         at java.awt.Component.processMouseEvent(Component.java:5517)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5282)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3984)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
)
         at 
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)

         at 
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1791)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
         at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
         at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

         at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



[2] The second full stack trace:



Exception occurred during event dispatching:
java.lang.NoClassDefFoundError: org/openrdf/OpenRDFException
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at 
org.ontoware.semversion.impl.SemVersionImpl.startup(SemVersionImpl.ja
va:87)
         at org.ontoware.semversion.SemVersion.startup(SemVersion.java:38)
         at 
sw.semversion.manager.main.VersionManagerTab.initSemVersion(VersionMa
nagerTab.java:73)
         at 
sw.semversion.manager.main.VersionManagerTab.initialize(VersionManage
rTab.java:53)
         at 
edu.stanford.smi.protege.widget.WidgetUtilities.createTabWidget(Unkno
wn Source)
         at edu.stanford.smi.protege.ui.ProjectView.addTab(Unknown Source)
         at 
edu.stanford.smi.protege.ui.ProjectView.createTabbedPane(Unknown Sour
ce)
         at edu.stanford.smi.protege.ui.ProjectView.<init>(Unknown Source)
         at 
edu.stanford.smi.protege.ui.ProjectManager.displayCurrentProject(Unkn
own Source)
         at 
edu.stanford.smi.protege.ui.ProjectManager.displayCurrentProject(Unkn
own Source)
         at 
edu.stanford.smi.protege.ui.ProjectManager.loadProject(Unknown Source
)
         at 
edu.stanford.smi.protege.ui.WelcomeDialog.doOpenProject(Unknown Sourc
e)
         at 
edu.stanford.smi.protege.ui.WelcomeDialog.openButton_actionPerformed(
Unknown Source)
         at 
edu.stanford.smi.protege.ui.WelcomeDialog$2.actionPerformed(Unknown S
ource)
         at 
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:18
49)
         at 
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
a:2169)
         at 
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
         at 
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
)
         at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:236)
         at 
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
31)
         at java.awt.Component.processMouseEvent(Component.java:5517)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5282)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3984)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at 
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212
)
         at 
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)

         at 
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1791)
         at java.awt.Component.dispatchEvent(Component.java:3819)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
         at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
         at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:153)
         at java.awt.Dialog$1.run(Dialog.java:535)
         at 
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
         at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
         at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

         at 
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


-- 
Jan Zemánek
Digital Enterprise Research Institute
National University of Galway
Galway, Ireland

e: jan.zemanek at deri.org
h: http://www.deri.ie/about/team/member/jan_zemanek/



More information about the protege-owl mailing list