I'm not saying it a datanucleus problem. frankly i have no idea where
gae stops and datanucleus begins. but basically the same code i have
posted here i use everywhere else and there's no problem elsewhere, it
was working fine and now it not.
sorry, you were right, i didn't turn on FINE in logging.properties
so this is my code with more logging output are marked log for
sections (1) and (2) below - looks like everything works but i get no
database entries.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
public void createCategories() {
PersistenceManager pm;
pm=PMF.get().getPersistenceManager();
log.info("**************************** start createCategories
******************************");
int ctrTop=0;
ArrayList<Category> add= new ArrayList<Category>();
for (String[] catTop: Category.itunesCategoriesTexts) {
int ctr = 0;
Category parent = null;
for (String cats: catTop) {
// loop part (1)
Category c = new Category();
log.info("after create: cat:"+cats);
log.info(JDOHelper.isPersistent(c)+":"+JDOHelper.isNew(c)
+":"+JDOHelper.isDirty(c));
c.setText(cats);
//Key catpk = new
KeyFactory.Builder(Category.class.getSimpleName
(), )
c.setTextClean(Category.cleanCatName(cats));
if (ctr>0) {
c.setParent(parent.getId());
} else {
parent=c;
}
log.info("after
set:"+JDOHelper.isPersistent(c)+":"+JDOHelper.isNew
(c)+":"+JDOHelper.isDirty(c));
pm.makePersistent(c);
log.info("after makePersistent1:"+c.hashCode()
+":"+JDOHelper.isPersistent(c)+":"+JDOHelper.isNew(c)
+":"+JDOHelper.isDirty(c));
// end loop part(1)
//add.add(c);
ctr++;
}
ctrTop++;
}
// commit part(2)
log.info("brfore pm.close();:");
pm.close();
log.info("after pm.close();:");
log.info("**************************** end createCategories
******************************");
// end commit part(2)
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
loop part(1): the parts in the loop run like this - there are may
cycles of the same thing.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: after create: cat:Uncategorised
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: false:false:false
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: after set:false:false:false
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
persistObjectInternal
FINE: Making object persistent :
"net.robmunro.mypod.web.db.categ...@1eb7d25"
26-Jan-2010 03:46:14 org.datanucleus.ConnectionManagerImpl
allocateConnection
FINE: Connection found in the pool :
org.datanucleus.store.appengine.DatastoreConnectionFactoryImpl
$datastoremanagedconnect...@18c6982
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
putObjectIntoCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@1eb7d25"
(id="org.datanucleus.identity.identityrefere...@165091f")
added to Level 1 cache (loadedFlags="[YYYYY]")
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: after makePersistent1:32210213:true:true:true
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
commit part(2) : after the loop the logging around pm.close() is:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: brfore pm.close();:
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl close
INFO: Outstanding nontx update being committed to datastore
26-Jan-2010 03:46:14 org.datanucleus.transaction.Transaction <init>
FINE: Transaction created [DataNucleus Transaction, ID=Xid=
26-Jan-2010 03:46:14 org.datanucleus.TransactionImpl internalBegin
FINE: Transaction begun for ObjectManager
org.datanucleus.objectmanageri...@c278b5 (optimistic=false)
26-Jan-2010 03:46:14 org.datanucleus.TransactionImpl internalPreCommit
FINE: Transaction committing for ObjectManager
org.datanucleus.objectmanageri...@c278b5
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl flushInternal
FINE: ObjectManager internalFlush() process started - 68 dirty objects
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl flushInternal
FINE: ObjectManager internalFlush() process finished
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
performReachabilityAtCommit
FINE: Performing check of objects for "persistence-by-
reachability" (commit) ...
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
performReachabilityAtCommit
FINE: Completed check of objects for "persistence-by-
reachability" (commit).
26-Jan-2010 03:46:14 org.datanucleus.transaction.Transaction commit
FINE: Committing [DataNucleus Transaction, ID=Xid=
26-Jan-2010 03:46:14 org.datanucleus.TransactionImpl commit
FINE: Transaction committed in 6 ms
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@1f6d2e3 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@1f6d2e3,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@1f6d2e3"
(id="org.datanucleus.identity.identityrefere...@18f729c")
removed from Level 1 cache [cache size = 68]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@41c977 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@41c977,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@41c977"
(id="org.datanucleus.identity.identityrefere...@111ae04")
removed from Level 1 cache [cache size = 67]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@162f16 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@162f16,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@162f16"
(id="org.datanucleus.identity.identityrefere...@6d670a")
removed from Level 1 cache [cache size = 66]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@92eb86 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@92eb86,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@92eb86"
(id="org.datanucleus.identity.identityrefere...@303a60")
removed from Level 1 cache [cache size = 65]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@1b7bf86 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@1b7bf86,
lifecycle=P_NEW]
FINE: Object
"net.robmunro.mypod.web.db.categ...@38462a"
(id="org.datanucleus.identity.identityrefere...@869470")
removed from Level 1 cache [cache size = 15]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@590510 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@590510,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@590510"
(id="org.datanucleus.identity.identityrefere...@5b6d00")
removed from Level 1 cache [cache size = 14]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@48cd13 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@48cd13,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@48cd13"
(id="org.datanucleus.identity.identityrefere...@18fc9ba")
removed from Level 1 cache [cache size = 13]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@e90e23 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@e90e23,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@e90e23"
(id="org.datanucleus.identity.identityrefere...@9f2588")
removed from Level 1 cache [cache size = 12]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@16ab2e8 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@16ab2e8,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@16ab2e8"
(id="org.datanucleus.identity.identityrefere...@7bacb")
removed from Level 1 cache [cache size = 11]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@11a9310 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@11a9310,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@11a9310"
(id="org.datanucleus.identity.identityrefere...@1ad093c")
removed from Level 1 cache [cache size = 10]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@b57af1 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@b57af1,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@b57af1"
(id="org.datanucleus.identity.identityrefere...@9a99eb")
removed from Level 1 cache [cache size = 9]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@8e85b5 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@8e85b5,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@8e85b5"
(id="org.datanucleus.identity.identityrefere...@ec42e0")
removed from Level 1 cache [cache size = 8]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@157211f from
statemanager[pc=net.robmunro.mypod.web.db.categ...@157211f,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@157211f"
(id="org.datanucleus.identity.identityrefere...@13f99af")
removed from Level 1 cache [cache size = 7]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@e62121 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@e62121,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@e62121"
(id="org.datanucleus.identity.identityrefere...@8917a2")
removed from Level 1 cache [cache size = 6]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@487ae0 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@487ae0,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@487ae0"
(id="org.datanucleus.identity.identityrefere...@7b21ea")
removed from Level 1 cache [cache size = 5]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@1854b38 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@1854b38,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@1854b38"
(id="org.datanucleus.identity.identityrefere...@d81b4")
removed from Level 1 cache [cache size = 4]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@87e9bf from
statemanager[pc=net.robmunro.mypod.web.db.categ...@87e9bf,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@87e9bf"
(id="org.datanucleus.identity.identityrefere...@1033450")
removed from Level 1 cache [cache size = 3]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@1ad6c98 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@1ad6c98,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@1ad6c98"
(id="org.datanucleus.identity.identityrefere...@b49b19")
removed from Level 1 cache [cache size = 2]
26-Jan-2010 03:46:14 org.datanucleus.state.JDOStateManagerImpl
disconnect
FINE: Disconnecting net.robmunro.mypod.web.db.categ...@318293 from
statemanager[pc=net.robmunro.mypod.web.db.categ...@318293,
lifecycle=P_NEW]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
removeObjectFromCache
FINE: Object
"net.robmunro.mypod.web.db.categ...@318293"
(id="org.datanucleus.identity.identityrefere...@739aa3")
removed from Level 1 cache [cache size = 1]
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl
disconnectSMCache
FINE: Level 1 Cache cleared
26-Jan-2010 03:46:14 org.datanucleus.ObjectManagerImpl postClose
FINE: Object Manager "org.datanucleus.objectmanageri...@c278b5" closed
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: after pm.close();:
26-Jan-2010 03:46:14 net.robmunro.mypod.web.servlet.SearchServlet
createCategories
INFO: **************************** end createCategories
******************************
On Jan 25, 6:38 pm, datanucleus <[email protected]> wrote:
> > log is at debug level - still no messages no nothing ....
>
> So nothing to do with DataNucleus then since that gives piles of
> logging at debug level for ANY persistence operation (including the
> one you mention some exception for). If the persistence process is
> running then you have configured your log wrong, or are looking in the
> wrong place for the log output.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.