0 Replies - 10583 Views - Last Post: 12 August 2011 - 05:48 AM

#1 nbajnaid  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 11
  • Joined: 09-January 11

NoClassDefFoundError: edu/stanford/smi/protege/model/KnowledgeBase

Posted 12 August 2011 - 05:48 AM

I building a java API to manage OWL ontology (edited by Protege 3.4.6) and I use eclipse and apache tomcat_7. I copied all jars from edu.stanford.smi.protegex.owl to the lib directory of my web application. I also copied the following jars to the application path:
protege, looks, unicode_panel, and the jess jar

I'm getting the following error when trying to infer the ontology model

NoClassDefFoundError: edu/stanford/smi/protege/model/KnowledgeBase

I use the following code to read the ontology:


FileInputStream file = new FileInputStream ("C:/Program Files/Protege_3.4.6/examples/SQOntology/SQOntologyNewView.owl"); 

Reader in = new InputStreamReader (file); 

OWLModel owlModel = ProtegeOWL.createJenaOWLModelFromReader(in); 

SWRLRuleEngine ruleEngine = SWRLRuleEngineFactory.create(owlModel); 


Collection clses = owlModel.getUserDefinedOWLNamedClasses(); 

model = new JenaCreator(owlModel, false, true, clses, null).createOntModel(); 

The same code works for a simple java program but not as a server



Is This A Good Question/Topic? 0
  • +

Page 1 of 1