title: Google App Engine - Update JPA 1 to JPA 2
body: <p>I want to update my GAE web app to use JPA 2.0. From the doc <a href="https://developers.google.com/appengine/docs/java/datastore/jpa/overview-dn2#Setting_Up_JPA_2_0" rel="nofollow">here</a>, it says that I have to copy the content of <code>appengine-java-sdk/lib/opt/user/datanucleus/v2/</code> to <code>lib</code> folder of the project. </p>
  
  <p>This are the files of <code>appengine-java-sdk/lib/opt/user/datanucleus/v2/</code>:</p>
  
  <ol>
  <li>asm-4.0.jar</li>
  <li>datanucleus-api-jdo-3.1.3.jar</li>
  <li>datanucleus-api-jpa-3.1.3.jar</li>
  <li>datanucleus-appengine-2.1.2.jar</li>
  <li>datanucleus-core-3.1.3.jar</li>
  <li>geronimo-jpa_2.0_spec-1.0.jar</li>
  <li>jdo-api-3.0.1.jar</li>
  <li>jta-1.1.jar</li>
  </ol>
  
  <p>Currently, this are the content of project's <code>lib</code> folder that might affect the migration:</p>
  
  <ol>
  <li>appengine-api-1.0-sdk-1.7.7.1.jar</li>
  <li>appengine-api-labs.jar</li>
  <li>appengine-endpoints.jar</li>
  <li>appengine-jsr107cache-1.7.7.1.jar</li>
  <li>asm-3.3.jar</li>
  <li>asm-commons-3.3.jar</li>
  <li>asm-tree-3.3.jar</li>
  <li>datanucleus-appengine-1.0.10.final.jar</li>
  <li>datanucleus-core-1.1.5.jar</li>
  <li>datanucleus-jpa-1.1.5.jar</li>
  <li>geronimo-jpa_3.0_spec-1.1.1.jar</li>
  <li>geronimo-jta_1.1_spec-1.1.1.jar</li>
  <li>jdo2-api-2.3-eb.jar</li>
  <li>jsr107cache-1.1.jar</li>
  </ol>
  
  <p>Which files should I delete? I tried to delete files which have new version but eclipse is looking for older files:</p>
  
  <ol>
  <li>datanucleus-appengine-1.0.10.final.jar</li>
  <li>datanucleus-core-1.1.5.jar</li>
  <li>geronimo-jpa_3.0_spec-1.1.1.jar</li>
  </ol>
  
  <p>This is my persistence.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
          http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"&gt;
  
      &lt;persistence-unit name="transactions-optional"&gt;
          &lt;provider&gt;org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider&lt;/provider&gt;
          &lt;properties&gt;
              &lt;property name="datanucleus.NontransactionalRead" value="true"/&gt;
              &lt;property name="datanucleus.NontransactionalWrite" value="true"/&gt;
              &lt;property name="datanucleus.ConnectionURL" value="appengine"/&gt;
  
              &lt;property name="datanucleus.appengine.ignorableMetaDataBehavior" value="NONE"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Any help on this? Thanks</p>