[Pellet-users] Problem with running the RulesExample2 sample
Role Francois
francois.role at univ-paris5.fr
Mon Sep 3 12:19:37 UTC 2007
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)
More information about the Pellet-users
mailing list