I found out this was due to object references directly inside other
objects, which created owned relationships. I have now removed all
object references from other objects and I am using Key references
where I would have otherwise used an Object. Thanks!

On Aug 27, 9:37 am, Shaun <shaunc...@gmail.com> wrote:
> I have the following code:
>
> public String addBankAccountTransaction(String
> lBankAccountTransactionJson) {
>                 
> log.info("\n\nBankAccountActions::addBankAccountTransaction:start");
>
>                 GsonBuilder gsonb = new GsonBuilder();
>                 DateDeserializer ds = new DateDeserializer();
>                 gsonb.registerTypeAdapter(Date.class, ds);
>                 GoogleKeyDeserializer gkd = new GoogleKeyDeserializer();
>                 gsonb.registerTypeAdapter(Key.class, gkd);
>                 Gson gson = gsonb.create();
>
>                 BankAccountTransaction lBankAccountTransaction =
> gson.fromJson(lBankAccountTransactionJson,
> BankAccountTransaction.class);
>
>                 PersistenceManager pm = 
> PMF.getSecond().getPersistenceManager();
>
>                 Transaction tx = pm.currentTransaction();
>
>                 try {
>                         tx.begin();
>                         pm.makePersistent(lBankAccountTransaction);
>                         tx.commit();
>
> log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac 
> tion.getKey::Committed
> transction");
>                 } catch (Exception e) {
>                         
> log.info("BankAccountActions::addBankAccountTransaction:Exception "
> + e.getStackTrace());
>                 } finally {
>                         if (tx.isActive()) {
>
> log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac 
> tion.getKey::transction
> FAILED!");
>                                 tx.rollback();
>                         }
>                         pm.close();
>                 }
>
> log.info("BankAccountActions::addBankAccountTransaction:lBankAccountTransac 
> tion.getKey()
> " + lBankAccountTransaction.getKey());
>
>                 log.info("BankAccountActions::getBankAccounts:end\n\n");
>                 return "ok";
>         }
>
> It throws no error, but the makePersistent doesn't seem to complete/
> work and the key is subsequently null and it doesn't show up in the
> datastoreviewer so I assume it's not there. Maybe I don't have logging
> setup correctly, my logging.properties looks like:
>
> java.util.logging.ConsoleHandler.formatter =
> java.util.logging.SimpleFormatter
>
> # Set the default logging level for INFO loggers to WARNING
> .level = INFO
>
> # Set the default logging level for ORM, specificFINEy, to INFO
> DataNucleus.JDO.level=INFO
> DataNucleus.Persistence.level=FINE
> DataNucleus.Cache.level=INFO
> DataNucleus.MetaData.level=INFO
> DataNucleus.General.level=INFO
> DataNucleus.Utility.level=INFO
> DataNucleus.Transaction.level=FINE
> DataNucleus.Datastore.level=FINE
> DataNucleus.ClassLoading.level=INFO
> DataNucleus.Plugin.level=INFO
> DataNucleus.ValueGeneration.level=INFO
> DataNucleus.Enhancer.level=INFO
> DataNucleus.SchemaTool.level=INFO
>
> Any ideas why this isn't saving and why I don't see any errors? I am
> using SDK 1.3.6. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to