Ah yes, you can get these if you are debugging for some time and then resume your app. I have also had this when I am working with a lot of data - but usually more than the live servers could handle in 30 seconds anyway. The local datastore seems to reclaim objects too quickly sometimes. But this is only a local issue - not a problem in production.

On 26 Jan 2010, at 12:05, Jim wrote:

Hi All,

I need a hint. I'm running JUnit tests on a local datastore. I have
multiple tests that pass when run by themselves and fail when run with
the other tests. The specific failure is a DataStoreFailureException
with detail message: "ApplicationError: 3: handle 14 not found".

The stacktrace is not that informative:
com.google.appengine.api.datastore.DatastoreFailureException: handle
14 not found
        at
com.google.appengine.api.datastore.DatastoreApiHelper.translateError
(DatastoreApiHelper.java:46)
        at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall
(DatastoreApiHelper.java:60)
        at com.google.appengine.api.datastore.DatastoreServiceImpl$1.run
(DatastoreServiceImpl.java:113)
        at
com.google.appengine.api.datastore.TransactionRunner.runInTransaction
(TransactionRunner.java:30)
        at com.google.appengine.api.datastore.DatastoreServiceImpl.get
(DatastoreServiceImpl.java:99)
        at com.google.appengine.api.datastore.DatastoreServiceImpl.get
(DatastoreServiceImpl.java:72)
        at com.google.appengine.api.datastore.DatastoreServiceImpl.get
(DatastoreServiceImpl.java:65)
        at org.dablr.lib.pyrite.data.gae.GaeDataService.getEntity
(GaeDataService.java:328)
        at org.dablr.lib.pyrite.data.gae.GaeDataService.getEntity
(GaeDataService.java:110)
        at org.dablr.lib.pyrite.data.DataServiceTest.testOpen
(DataServiceTest.java:287)
....

The tests do setUp and tearDown as suggested in the how-to on JUnit
tests:
        @Override
        public void setUp() throws Exception {
       ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment
());
       ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(".")){});
       ApiProxyLocalImpl proxy = (ApiProxyLocalImpl)
ApiProxy.getDelegate();
       proxy.setProperty(LocalDatastoreService.NO_STORAGE_PROPERTY,
Boolean.TRUE.toString());
       LocalDatastoreService datastoreService =
           (LocalDatastoreService) proxy.getService
(LocalDatastoreService.PACKAGE);
       datastoreService.clearProfiles();
                super.setUp();
        }

        @Override
        public void tearDown() throws Exception {
                super.tearDown();
       ApiProxyLocalImpl proxy = (ApiProxyLocalImpl)
ApiProxy.getDelegate();
       LocalDatastoreService datastoreService =
           (LocalDatastoreService) proxy.getService
(LocalDatastoreService.PACKAGE);
       datastoreService.clearProfiles();
       ApiProxy.setDelegate(null);
       ApiProxy.setEnvironmentForCurrentThread(null);
        }

It appears that something is breaking the local data store in a way
that is not cleared between tests. Prior to the failure, the failing
test successfully does an entity put which it is then trying to get
back. Any suggestions on a way forward?

Thanks,
Jim

--
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-java@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 .


--
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