title: JPA and derby null pointer exception
body: <p>I am trying to do a simple persistence with jpa 2.0 and derby but I keep getting a NullPointerException.</p>
  
  <p>Exception and entity class - <a href="http://pastebin.com/QqXhRdcN" rel="nofollow">http://pastebin.com/QqXhRdcN</a></p>
  
  <p>The code where I am trying to persist</p>
  
  <pre><code>EntityManager em = emf.createEntityManager();  
    Course c = new Course("cse", 214, "fall", 2010);  
    em.getTransaction().begin();  
    em.persist(c);  
    em.getTransaction().commit();  
    em.close();  
  </code></pre>
  
  <p>The null pointer exception occurs at line 171 which is the first line of the above code. </p>
  
  <p>Thanks in advance!</p>