Search Mailing List Archives
[protege-discussion] ModelFactory error
Thomas Russ
tar at ISI.EDU
Fri Oct 5 11:29:24 PDT 2007
On Oct 5, 2007, at 8:11 AM, Davenport, Daniel wrote:
> I ran my code with the class generated by Protégé for my ontology
> and got this messge
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError: org/
> apache/commons/logging/LogFactory
>
> at com.hp.hpl.jena.rdf.model.impl.PropertyImpl.<clinit>
> (PropertyImpl.java:61)
>
> at com.hp.hpl.jena.enhanced.BuiltinPersonalities.<clinit>
> (BuiltinPersonalities.java:28)
>
> at com.hp.hpl.jena.rdf.model.impl.ModelCom.<init>
> (ModelCom.java:51)
>
> at com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel
> (ModelFactory.java:162)
>
> at com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel
> (ModelFactory.java:156)
>
> at com.hp.hpl.jena.rdf.model.impl.ModelSpecImpl.<clinit>
> (ModelSpecImpl.java:56)
>
> at lantern.test.<clinit>(test.java:18)
>
> at lantern.Lantern.main(Lantern.java:23)
>
>
>
> I used the right libraries
>
>
>
> import com.hp.hpl.jena.rdf.model.*;
>
> import com.hp.hpl.jena.ontology.*;
>
>
>
> so it compiled alright. Im running it on Eclipse. So what am I
> missing?
You don't have your classpath setup properly for the runtime.
At runtime there are more dependencies that come from the code you
are using but haven't written yourself.
You need to add all of the *.jar files from the main Protege directory.
You may also need to add the jar files from the OWL plugin directory
as well, although the plugin loader may take care of that for you.
That's where the commons-logging file comes from.
More information about the protege-discussion
mailing list