title: Servlet Throwing java.lang.ClassNotFoundException when class in path
body: <p>I am writing a simple servlet and trying to create an instance of one of my classes, <code>DataStore</code>, in the code.</p>
  
  <p>This class is public and sits in a file called <code>DataStore.java</code> in the same package as the Servlet code.</p>
  
  <p>When I try to create a new instance in the code:</p>
  
  <pre><code>DataStore dStore = new DataStore();
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>java.lang.ClassNotFoundException: backend.DataStore
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
      at backend.AjaxServlet.createGame(AjaxServlet.java:196)
  </code></pre>
  
  <p>I tried creating an instance of this class in a differnet file and it worked great.
  Any idea what could be the cause of this?</p>