sorry there was a problem in my link to the logs for problem 1. Here is the link with all the lines: http://tinypaste.com/a303b
On 9 déc, 21:16, Ratamovic <[email protected]> wrote: > I found something weird in the log: > INFO: Performing appengine-specific metadata validation for > com.testgae.xp.domain.B > 9 déc. 2009 20:59:57 org.datanucleus.store.appengine.MetaDataValidator > warn > ATTENTION: Meta-data warning for com.testgae.xp.domain.B._cUpdates: > The datastore does not support joins and therefore cannot honor > requests to place child objects in the default fetch group. The field > will be fetched lazily on first access. ... > ATTENTION: Meta-data warning for com.testgae.xp.domain.B._parent: The > datastore does not support joins and therefore cannot honor requests > to place child objects in the default fetch group. The field will be > fetched lazily on first access. ... > > 3- For problem 3, It looks like it's written but not loaded. getting > the persistenceManager only once does not change anything. On the > following link is an extract of my Log when I persist my entity ("A a2 > = _aDao.update(a); ") in testBug3:http://tinypaste.com/c2590 > > Here is the following line in testBug3 when I try to get load the > object ("_aDao.loadByKey(a.getKey());"):http://tinypaste.com/9c850 > > 1- Here is the full exception I get for problem 1 (and > thishttp://tinypaste.com/98f5ais the log when I persist my entity): > org.springframework.orm.jdo.JdoSystemException: can't update the same > entity twice in a transaction or operation; nested exception is > javax.jdo.JDOException: can't update the same entity twice in a > transaction or operation > NestedThrowables: > java.lang.IllegalArgumentException: can't update the same entity twice > in a transaction or operation > at > org.springframework.orm.jdo.PersistenceManagerFactoryUtils.convertJdoAccessException > (PersistenceManagerFactoryUtils.java:247) > at org.springframework.orm.jdo.DefaultJdoDialect.translateException > (DefaultJdoDialect.java:230) > at > org.springframework.orm.jdo.JdoTransactionManager.convertJdoAccessException > (JdoTransactionManager.java:503) > at org.springframework.orm.jdo.JdoTransactionManager.doCommit > (JdoTransactionManager.java:427) > at > org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit > (AbstractPlatformTransactionManager.java:732) > at > org.springframework.transaction.support.AbstractPlatformTransactionManager.commit > (AbstractPlatformTransactionManager.java:701) > at > org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning > (TransactionAspectSupport.java:321) > at > org.springframework.transaction.interceptor.TransactionInterceptor.invoke > (TransactionInterceptor.java:116) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed > (ReflectiveMethodInvocation.java:171) > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke > (JdkDynamicAopProxy.java:204) > at $Proxy9.update(Unknown Source) > at TestDao.testBug(TestDao.java:39) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at junit.framework.TestCase.runTest(TestCase.java:164) > at junit.framework.TestCase.runBare(TestCase.java:130) > at org.springframework.test.ConditionalTestCase.runBare > (ConditionalTestCase.java:69) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:120) > at junit.framework.TestSuite.runTest(TestSuite.java:230) > at junit.framework.TestSuite.run(TestSuite.java:225) > at > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run > (JUnit3TestReference.java:130) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run > (TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > (RemoteTestRunner.java:467) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > (RemoteTestRunner.java:683) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run > (RemoteTestRunner.java:390) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main > (RemoteTestRunner.java:197) > Caused by: javax.jdo.JDOException: can't update the same entity twice > in a transaction or operation > NestedThrowables: > java.lang.IllegalArgumentException: can't update the same entity twice > in a transaction or operation > at > org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException > (NucleusJDOHelper.java:419) > at org.datanucleus.jdo.JDOTransaction.commit(JDOTransaction.java:132) > at org.springframework.orm.jdo.JdoTransactionManager.doCommit > (JdoTransactionManager.java:423) > ... 27 more > Caused by: java.lang.IllegalArgumentException: can't update the same > entity twice in a transaction or operation > at > com.google.appengine.api.datastore.DatastoreApiHelper.translateError > (DatastoreApiHelper.java:33) > at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall > (DatastoreApiHelper.java:60) > at com.google.appengine.api.datastore.DatastoreServiceImpl$2.run > (DatastoreServiceImpl.java:173) > at > com.google.appengine.api.datastore.TransactionRunner.runInTransaction > (TransactionRunner.java:30) > at com.google.appengine.api.datastore.DatastoreServiceImpl.put > (DatastoreServiceImpl.java:161) > at com.google.appengine.api.datastore.DatastoreServiceImpl.put > (DatastoreServiceImpl.java:141) > at com.google.appengine.api.datastore.DatastoreServiceImpl.put > (DatastoreServiceImpl.java:137) > at > org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.put > (RuntimeExceptionWrappingDatastoreService.java:105) > at org.datanucleus.store.appengine.DatastorePersistenceHandler.put > (DatastorePersistenceHandler.java:172) > at org.datanucleus.store.appengine.DatastorePersistenceHandler.put > (DatastorePersistenceHandler.java:124) > at org.datanucleus.store.appengine.DatastorePersistenceHandler.put > (DatastorePersistenceHandler.java:119) > at > org.datanucleus.store.appengine.DatastorePersistenceHandler.updateObject > (DatastorePersistenceHandler.java:492) > at org.datanucleus.state.JDOStateManagerImpl.flush > (JDOStateManagerImpl.java:4576) > at org.datanucleus.ObjectManagerImpl.flushInternal > (ObjectManagerImpl.java:2814) > at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java: > 2754) > at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java: > 2893) > at org.datanucleus.TransactionImpl.internalPreCommit > (TransactionImpl.java:369) > at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256) > at org.datanucleus.jdo.JDOTransaction.commit(JDOTransaction.java:83) > ... 28 more > > Except this story of join (but B should be a child entity?), I don't > see where it can come from... I don't remember if I said it anywhere > but I tried with bidirectional links everywhere instead of > unidirectional (A&B, B&C, etc.) and it does not work neither. > Thanks a lot for your help > > On 9 déc, 15:04, datanucleus <[email protected]> wrote: > > > > 1- The transaction is really a JDO/datastore exception encapsulated by > > > Spring (as I am using the transactional components of Spring). To be > > > sure, I tried to execute these tests with manual transactions instead > > > of not Spring and the result was the same (except that it was not a > > > Spring exception but the message was the same). > > > Yes but the exception means nothing to me. The stack trace maybe > > would ;-) > > > > 3- You're right my comment is a bit imprecise: > > > > Sorry for the confusions or imprecisions :D. My problem is when I load > > > an object A which contains a list of B. Although one B was added to A, > > > it does not get loaded when I load A. But it is in the object returned > > > by makePersistent within my DAO: > > > So look in the log when you want to load some object, and see what > > happens. -- 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.
