title: Error while making object persistent
body: <p>I'm trying to write a Vaadin application on GAE platform with using JDO, and when I want to call this method:</p>
  
  <pre><code>public void createUser(String login, String password, String email) {
      PersistenceManager pm = PMF.get().getPersistenceManager();
      User user = new User(login, password, email);
      try {
          pm.makePersistent(user);
      } finally {
          pm.close();
      }
  
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>(...)Caused by: javax.jdo.JDOFatalUserException: A property named javax.jdo.PersistenceManagerFactoryClass must be specified, or a jar file with a META-INF/services/javax.jdo.PersistenceManagerFactory entry must be in the classpath, or a property named javax.jdo.option.PersistenceUnitName must be specified.
    NestedThrowables:
    javax.jdo.JDOUserException: You have either specified for this PMF to use a "persistence-unit" of "transactions-optional" (yet this doesnt exist!) or you called JDOHelper.getPersistenceManagerFactory with "transactions-optional" as the name of a properties file (and this doesnt exist in the CLASSPATH)
        at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:856)
        at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:1092)
        at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:914)
        at myapp.PMF.(PMF.java:8)
        ... 43 more
    Caused by: javax.jdo.JDOUserException: You have either specified for this PMF to use a "persistence-unit" of "transactions-optional" (yet this doesnt exist!) or you called JDOHelper.getPersistenceManagerFactory with "transactions-optional" as the name of a properties file (and this doesnt exist in the CLASSPATH) (...)</p>
  </blockquote>
  
  <p>I've searched the Google and found some solutions for this problem, but none works for my app (or I'm doing something incorrectly).
  For eg.<a href="http://jasonsmart.wordpress.com/" rel="nofollow" title="this">this</a> wouldn't work. Oh, and I have the jdoconfig.xml file in META-INF.
  If anyone had similar problem, and he'd like to share his wisdom I would be very appreciate.</p>
  
  <p>EDIT: jdoconfig file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig"&gt;
      &lt;persistence-manager-factory name="transactions-optional"&gt;
          &lt;property name="javax.jdo.PersistenceManagerFactoryClass"
              value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory" /&gt;
          &lt;property name="javax.jdo.option.ConnectionURL" value="appengine" /&gt;
          &lt;property name="javax.jdo.option.NontransactionalRead" value="true" /&gt;
          &lt;property name="javax.jdo.option.NontransactionalWrite"
              value="true" /&gt;
          &lt;property name="javax.jdo.option.RetainValues" value="true" /&gt;
          &lt;property name="datanucleus.appengine.autoCreateDatastoreTxns"
              value="true" /&gt;
      &lt;/persistence-manager-factory&gt;
  &lt;/jdoconfig&gt; 
  </code></pre>