[Pellet-users] Problem with running the RulesExample2 sample
Evren Sirin
evren at clarkparsia.com
Tue Sep 4 12:22:31 UTC 2007
Mostly for historic reasons Pellet rules support partly depended on
OWLAPI structures on 1.5.0 release. You will need at least api-1.0.jar
from lib/owlapi directory in Pellet distribution in the classpath for
this example program to work. You might add all the jar files in that
directory if you get more ClassNotFound exceptions. I think there is no
OWLAPI dependency left in the rules support so this should not be an
issue for the upcoming Pellet releases.
Cheers,
Evren
On 9/3/07 8:19 AM, Role Francois wrote:
> 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