title: No Class 'com.appspot.<projectname>.model.News' Registered
body: <p>I have a problem with the creation of my news articles: 
  CreateNewsServlet.java
  I use Objectify and GAE.
  I have a RegisterServlet.java that does work! But when I try to add a news article, i get the following stack:</p>
  
  <pre><code>mei 08, 2014 10:29:45 AM com.google.apphosting.utils.jetty.JettyLogger warn
  WARNING: /CreateNewsServlet.do
  java.lang.IllegalArgumentException: No class 'com.appspot.darkening.model.News' was registered
  at com.googlecode.objectify.ObjectifyFactory.getMetadata(ObjectifyFactory.java:247)
  at com.googlecode.objectify.ObjectifyFactory.getMetadataForEntity(ObjectifyFactory.java:273)
  at com.googlecode.objectify.impl.AsyncObjectifyImpl.put(AsyncObjectifyImpl.java:261)
  at com.googlecode.objectify.impl.AsyncObjectifyImpl.put(AsyncObjectifyImpl.java:239)
  at com.googlecode.objectify.impl.ObjectifyImpl.put(ObjectifyImpl.java:135)
  at com.appspot.darkening.model.service.NewsOfyDAOImpl.createNews(NewsOfyDAOImpl.java:29)
  at com.appspot.darkening.server.CreateNewsServlet.doPost(CreateNewsServlet.java:107)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
  at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:368)
  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:351)
  at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
  at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
  at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:97)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:485)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
  at org.mortbay.jetty.Server.handle(Server.java:326)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
  at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
  at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
  </code></pre>
  
  <p>My RegisterServlet &amp; DAO class.</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Date;
  import java.util.List;
  
  import com.appspot.darkening.model.User;
  import com.googlecode.objectify.Key;
  import com.googlecode.objectify.Objectify;
  import com.googlecode.objectify.ObjectifyService;
  
  public class UserOfyDAOImpl implements UserOfyDAO {
     private Objectify ofy;
  
  public UserOfyDAOImpl(){
        ofy = ObjectifyService.begin();
  
  }
  public void deleteUser(User u) {
        //TODO delete user ofy
         ofy.delete((u));
     }
  
  
     public void createUser(String us, String pw, String nm, int sec){
         ofy.put(new User(us, pw, nm, sec));
  
  
     }
  </code></pre>
  
  <p>//</p>
  
  <pre><code>import java.io.IOException;
  import java.util.ArrayList;
  import java.util.logging.Logger;
  
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  
  
  
  import com.appspot.darkening.model.User;
  import com.appspot.darkening.model.service.UserOfyDAOImpl;
  import com.googlecode.objectify.Objectify;
  import com.googlecode.objectify.ObjectifyService;
  
  
  public class RegisterServlet extends HttpServlet {
  private static final Logger log = Logger.getLogger(UserContextListener.class.getName());
  protected void doPost( HttpServletRequest req, HttpServletResponse resp) 
          throws ServletException, IOException{
  
  
      boolean succes = false;
      String name = req.getParameter("name");
      String username = req.getParameter("username");
      String pass = req.getParameter("password1");
      int seclvl = Integer.parseInt(req.getParameter("seclvl"));
  
      ArrayList&lt;User&gt; allUsers = new ArrayList&lt;User&gt;();
      allUsers = (ArrayList&lt;User&gt;) getServletContext().getAttribute("users");
      System.out.println(allUsers);
      if(name != null &amp;&amp;username != null &amp;&amp; pass != null){
  
  
          User u = new User(name,username, pass, seclvl);
          UserOfyDAOImpl uop = new UserOfyDAOImpl();
          for(User ul : uop.getAllUsers()){
              if(ul.getUsername().equals(username) &amp;&amp; ul.getPassword().equals(pass)){
                  log.info("gebruiker bestaat al");
              }
              else{
                  uop.createUser(name, username, pass, seclvl);
                  req.setAttribute("msgs", "Er is een leerling aangemaakt");
                  succes = true;
                  log.info("gebruiker:"+ uop+" is aangemaakt.");
              }
  
  
  
  
  
  
      }
  
  
      RequestDispatcher rd = null;
      if(succes){
          req.setAttribute("msgs", "Succes");
          rd = req.getRequestDispatcher("login.jsp");
      }
      else{
          rd = req.getRequestDispatcher("register.jsp");
      }
      rd.forward(req, resp);
  }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My CreateNewsServlet &amp; DAO class.</p>
  
  <pre><code>package com.appspot.darkening.model.service;
  
  import java.util.ArrayList;
  import java.util.Date;
  import java.util.List;
  
  import com.appspot.darkening.model.News;
  import com.googlecode.objectify.Key;
  import com.googlecode.objectify.Objectify;
  import com.googlecode.objectify.ObjectifyService;
  
  public class NewsOfyDAOImpl implements NewsOfyDAO {
     private Objectify ofy;
  
  public NewsOfyDAOImpl(){
        ofy = ObjectifyService.begin();
  
  }
  public void deleteNews(News u) {
        //TODO delete News ofy
         ofy.delete((u));
     }
  
     public void createNews(String us, String pw,  int sec, String au, String da){
         ofy.put(new News(us, pw, sec, au, da));
     }
  
  package com.appspot.darkening.server;
  
  import java.io.IOException;
  import java.text.DateFormat;
  import java.text.SimpleDateFormat;
  import java.util.ArrayList;
  import java.util.Calendar;
  import java.util.Date;
  import java.util.logging.Logger;
  
  import javax.servlet.RequestDispatcher;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  import com.appspot.darkening.model.News;
  import com.appspot.darkening.model.User;
  import com.appspot.darkening.model.service.NewsOfyDAOImpl;
  import com.appspot.darkening.model.service.UserOfyDAOImpl;
  import com.googlecode.objectify.Objectify;
  import com.googlecode.objectify.ObjectifyService;
  
  
  public class CreateNewsServlet extends HttpServlet {
  /**
   * 
   */
  private static final long serialVersionUID = 1L;
  private static final Logger log = Logger.getLogger(UserContextListener.class.getName());
  
  public void doGet(HttpServletRequest request,  HttpServletResponse response) throws IOException,                                                  ServletException {  
  doPost(request, response);  } 
  
  protected void doPost( HttpServletRequest req, HttpServletResponse resp) 
          throws ServletException, IOException{
  
       boolean succes = false;
       String title = req.getParameter("title");
       String description = req.getParameter("descr");
       String securityLevel = req.getParameter("seclvl");
       int seclvl = 1;
       seclvl = Integer.parseInt(securityLevel);
       String author = req.getParameter("author");
      // Create an instance of SimpleDateFormat used for formatting 
      // the string representation of date (month/day/year)
      DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
  
      // Get the date today using Calendar object.
      Date today = Calendar.getInstance().getTime();        
      // Using DateFormat format method we can create a string 
      // representation of a date with the defined format.
       String date = df.format(today);
  
       System.out.println(title);
       System.out.println(description);
       System.out.println(seclvl);
       System.out.println(author);
       System.out.println(today); 
       System.out.println(date);  
       ArrayList&lt;User&gt; allUsers = new ArrayList&lt;User&gt;();
          allUsers = (ArrayList&lt;User&gt;) getServletContext().getAttribute("users");
          UserOfyDAOImpl n = new UserOfyDAOImpl();
  
      if(title != null &amp;&amp; description != null &amp;&amp; seclvl != 0 &amp;&amp; author != null &amp;&amp; date !=null){
  
          News u = new News(title,description, seclvl, author, date);
          NewsOfyDAOImpl uop = new NewsOfyDAOImpl();
  
                  uop.createNews(title, description, seclvl, author, date);
                  req.setAttribute("msgs", "Er is een leerling aangemaakt");
                  succes = true;
                  log.info("gebruiker:"+ uop+" is aangemaakt.");
  
      }
  
      RequestDispatcher rd = null;
      if(succes){
          req.setAttribute("msgs", "Succes");
          rd = req.getRequestDispatcher("index-goede.jsp");
      }
      else{
          rd = req.getRequestDispatcher("CreateNews.jsp");
      }
      rd.forward(req, resp);
  
  }
  }
  </code></pre>
  
  <p>Any help or tips would be greatly be appreciated!</p>