views:

149

answers:

1

I am using the Eclipse plugin for Google App Engine 1.2.6 and Web Toolkit 1.7.1 DataNucleus/JDO is driving me mad! I suspect either my creates are silently erroring out before being written AND/OR the reads are inconsistently populating the objects.

I could use some tips on figuring out what is really happening.

  • Using a minimally unmodified GAE project, where is the log written by the dn enhancer?
  • Is there a log written by the datastore code?
  • Is there anyway to inspect the contents local_db.bin file?

  • Using the basic JDO transaction syntax below, how do I understand the error/exception without disturbing the builtin error handing mechanism?

TIA, Andy

    private final Provider<PersistenceManager> pmp;
    private PersistenceManager pm;
    MyResult result; // results from handler, usually has object id or error message

    try {
    pm = pmp.get();
    pm.currentTransaction().begin();

        /* validate, fetch, create/update persistent myObject */

        pm.currentTransaction().commit();
        result = new MyResult( myObject.getId() ); 
    } finally {
        if (pm.currentTransaction().isActive()) {
         logger.severe("DN fails...");
         pm.currentTransaction().rollback();
         result = new MyResult( "error message why failed" );
        }
    }
    return (result);
A: 

So you want to debug this yet you set log levels to INFO? I'd suggest DEBUG would make way more sense. The GAE/J docs have some page on logging - can't remember the URL sorry; search their Google Group cos there are several posts about it. How you invoke the enhancer is not defined ? Using Google's Eclipse plugin ? or manually ? or Maven2 ? or Ant ? The DN docs define where the log is ... for all options except Googles plugin (since that is theirs and we don't support it).

Obviously there is a local_db viewer - search their Google Group

--Andy (DataNucleus)

DataNucleus
Found the local data view at http://localhost:8080/_ah/admin/datastore
Stevko