[Pellet-users] Problem with running the SRWL RulesExample
Ibach, Brandon L
brandon.l.ibach at lmco.com
Wed Sep 5 22:17:12 UTC 2007
A NoClassDefFoundError is almost always due to a missing JAR
file. In this case, it looks like you're missing the OWL API libraries.
If you're not sure how to correct this, can you tell us exactly
what command line you used to run this example, including the value of
the CLASSPATH environment variable, if you had it set?
-Brandon :)
> -----Original Message-----
> From: pellet-users-bounces at lists.owldl.com
> [mailto:pellet-users-bounces at lists.owldl.com] On Behalf Of
> Role Francois
> Sent: Saturday, September 01, 2007 8:38 AM
> To: pellet-users at lists.owldl.com
> Subject: [Pellet-users] Problem with running the SRWL RulesExample
>
> Hi Pellet users,
>
> When running the following sample program :
>
> package org.mindswap.pellet.examples;
>
> import java.util.Iterator;
>
> import org.mindswap.pellet.jena.PelletReasonerFactory;
>
> import com.hp.hpl.jena.ontology.Individual;
> import com.hp.hpl.jena.ontology.ObjectProperty;
> import com.hp.hpl.jena.ontology.OntClass;
> import com.hp.hpl.jena.ontology.OntModel;
> import com.hp.hpl.jena.rdf.model.ModelFactory;
> import com.hp.hpl.jena.rdf.model.Property;
> import com.hp.hpl.jena.rdf.model.Resource;
>
>
>
> public class RulesExample2 {
> public static void main(String[] args) {
>
>
> String ont = "http://localhost/dl-safe.owl";
>
> OntModel model = ModelFactory.createOntologyModel(
> PelletReasonerFactory.THE_SPEC, null );
>
> model.read( ont );
>
> ObjectProperty sibling =
> model.getObjectProperty( ont +
> "#sibling" );
>
> OntClass BadChild = model.getOntClass( ont +
> "#BadChild" );
> OntClass Child = model.getOntClass( ont + "#Child" );
>
> Individual Abel = model.getIndividual( ont +
> "#Abel" );
> Individual Cain = model.getIndividual( ont +
> "#Cain" );
> Individual Remus = model.getIndividual( ont +
> "#Remus" );
> Individual Romulus = model.getIndividual( ont
> + "#Romulus" );
>
> model.prepare();
>
>
> System.out.println("Hello World !!!****jjjj");
> }
> }
>
>
> I get the following error mesage (model.prepare() seems to cause the
> program to fail) :
>
> C:\Perso\tools\apache-ant-1.6.5-bin\apache-ant-1.6.5>ant
> Buildfile: build.xml
>
> clean:
> [delete] Deleting directory
> C:\Perso\tools\apache-ant-1.6.5-bin\apache-ant-1.
> 6.5\build
>
> .............
>
> run:
> [java] INFO [main] (PelletOptions.java:82) - Reading Pellet
> configuration
> file
> jar:file:/C:/Perso/tools/apache-ant-1.6.5-bin/apache-ant-1.6.5
> /pellet-lib/p
> ellet.jar!/pellet.properties
> [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> org/seman
> ticweb/owl/model/OWLException
> [java] at
> org.mindswap.pellet.KnowledgeBase.chooseStrategy(KnowledgeBas
> e.java:3626)
> [java] at
> org.mindswap.pellet.KnowledgeBase.chooseStrategy(KnowledgeBas
> e.java:3610)
>
>
>
> _______________________________________________
> Pellet-users mailing list
> Pellet-users at lists.owldl.com
> http://lists.owldl.com/mailman/listinfo/pellet-users
> _______________________________________________
>
> Sponsored by Clark & Parsia, LLC http://clarkparsia.com/
>
More information about the Pellet-users
mailing list