Pellet + Jena

279 views
Skip to first unread message

Halim Noor

unread,
Apr 15, 2014, 1:53:31 AM4/15/14
to pellet...@googlegroups.com
Hello, I'm running Pellet with Jena as the following:

public static void main(String[] args) {
       
        String inputFileName = "onto.ttl";

        FileInputStream inputStream = null;
       
        try {
            inputStream = new FileInputStream(inputFileName);
        } catch (FileNotFoundException e) {
            System.err.println("'" + inputFileName
                    + "' is an invalid input file.");
            return;
        }
              
        OntModel model = null;

        model = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);
       
        model.read(inputStream, null, inputFileFormat);

        ...
}


But I'm getting error as follows

Exception in thread "main" java.lang.NoClassDefFoundError: aterm/ATerm
    at org.mindswap.pellet.jena.PelletReasoner.bind(PelletReasoner.java:95)
    at org.mindswap.pellet.jena.PelletReasoner.bind(PelletReasoner.java:53)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.generateGraph(OntModelImpl.java:2852)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:142)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.<init>(OntModelImpl.java:131)
    at com.hp.hpl.jena.rdf.model.ModelFactory.createOntologyModel(ModelFactory.java:378)
    at com.readismed.pellet.inferexample.InferExample.main(InferExample.java:79)

I'm using Pellet 2.3.1. Please help.

Thank you.

Halim

Christian-D

unread,
Apr 15, 2014, 5:01:50 AM4/15/14
to pellet...@googlegroups.com
Hello,

you are missing the aterm-java-1.6 library in your classpath. The jar-file can be found in the lib-folder of your pellet 2.3.1 distribution.

Greetings
Christian

Halim Noor

unread,
Apr 15, 2014, 5:14:32 AM4/15/14
to pellet...@googlegroups.com
Hello Christian,

It works. Thank you very much.

Halim
Reply all
Reply to author
Forward
0 new messages