title: Protege-OWL: java.lang.NoClassDefFoundError
body: <p>Im trying to run code use protege-owl. So I added the <code>protege.jar</code> and <code>protege-owl.jar</code> to library to import <code>edu.stanford.smi.protegex.owl.*</code>  and  <code>edu.stanford.smi.protege.*</code>.</p>
  
  <p>I also added jena jar files to use in next steps.</p>
  
  <p>First i wrote simple code to see how it works :</p>
  
  <pre><code> import java.lang.Object;
   import edu.stanford.smi.protege.*;
   import edu.stanford.smi.protegex.owl.*;
   import edu.stanford.smi.protegex.owl.jena.JenaOWLModel;
   import edu.stanford.smi.protegex.owl.model.OWLNamedClass;
  public class Main {
      public static void main(String[] args) {
             // TODO code application logic here
            JenaOWLModel model=ProtegeOWL.createJenaOWLModel();
            OWLNamedClass c= model.createOWLNamedClass("A");
            System.out.print(c.getName());   
         }
  }
  </code></pre>
  
  <p>But it gives me this error :</p>
  
  <pre><code>CONFIG: Protege 3.0 Build 141, JVM 1.6.0_20-b02, memory=259M, Windows 7, encoding=UTF-8, language=fa, country=IR
  WARNING: Look and feel not found: com.jgoodies.plaf.plastic.PlasticLookAndFeel -- SystemUtilities.loadLookAndFeel()
  WARNING: Plugins directory not found: C:\Users\mona\Documents\NetBeansProjects\JavaApplication3\plugins -- PluginUtilities.getPluginsDir()
  WARNING: Exception Caught -- java.lang.NoClassDefFoundError: com/toedter/calendar/JDateChooser
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:247)
          at edu.stanford.smi.protege.plugin.PluginUtilities.isLoadableClass(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.checkPlugin(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.checkPlugins(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.processManifest(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.loadPluginsWithClassLoader(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.createClassLoaderAndLoadPlugins(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.loadPlugins(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.loadSystemPlugins(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.loadPlugins(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.init(Unknown Source)
          at edu.stanford.smi.protege.plugin.PluginUtilities.&lt;clinit&gt;(Unknown Source)
          at edu.stanford.smi.protege.util.SystemUtilities.init(Unknown Source)
          at edu.stanford.smi.protege.util.SystemUtilities.&lt;clinit&gt;(Unknown Source)
          at edu.stanford.smi.protege.model.Project.&lt;clinit&gt;(Unknown Source)
          at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModel(ProtegeOWL.java:32)
          at javaapplication3.Main.main(Main.java:25)
  Caused by: java.lang.ClassNotFoundException: com.toedter.calendar.JDateChooser
          at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
          at java.security.AccessController.doPrivileged(Native Method) . . . .
  </code></pre>
  
  <p>What can I do ?</p>
  
  <hr>
  
  <p><strong>Update:</strong>
  I replace protege.jar with protege-3.5.jar and now it gives :</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: edu.stanford.smi.protege.model.SystemFrames.replaceFrame(Ledu/stanford/smi/protege/model/Frame;)V
          at edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.createSystemFrames(AbstractOWLModel.java:544)
          at edu.stanford.smi.protege.model.DefaultKnowledgeBase.&lt;init&gt;(DefaultKnowledgeBase.java:79)
          at edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.&lt;init&gt;(AbstractOWLModel.java:318)
          at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.&lt;init&gt;(JenaOWLModel.java:62)
          at edu.stanford.smi.protegex.owl.jena.JenaKnowledgeBaseFactory.createKnowledgeBase(JenaKnowledgeBaseFactory.java:55)
          at edu.stanford.smi.protege.model.Project.createDomainKB(Project.java:429)
          at edu.stanford.smi.protege.model.Project.createDomainKnowledgeBase(Project.java:447)
          at edu.stanford.smi.protege.model.Project.&lt;init&gt;(Project.java:359)
          at edu.stanford.smi.protege.model.Project.&lt;init&gt;(Project.java:341)
          at edu.stanford.smi.protege.model.Project.createNewProject(Project.java:545)
          at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModel(ProtegeOWL.java:32)
          at javaapplication3.Main.main(Main.java:24)
  Java Result: 1
  </code></pre>
  
  <p>Where is the problem?</p>