Hi,

I had a problem in my app that would only show when using the live data and I could not load all the live data into the local datastore. So I wrote an ApiProxy.Delegate which intercepts all datastore RPC calls on the dev server and posts the binary data to a servlet running in my live app that calls ApiProxy.makeSyncCall and returns the binary result back to the dev server.

I thought that this approach might also be an easy way to manipulate data in a production datastore directly from code on your local machine. i.e. you could even write a TestCase that loads data or sends emails... many cool uses.

It *almost* works... the only part that is not working so far are calls to "Next" which are made by result Iterators when they need a new chuck of data. This runs fine in dev mode (connecting from one dev server to another) but on the live servers throws:

com.google.apphosting.api.ApiProxy$ApplicationException: ApplicationError: 1: invalid handle: 18336955636086461310 at com.google.apphosting.runtime.ApiProxyImpl $AsyncApiFuture.rpcFinished(ApiProxyImpl.java:293) at com.google.net.rpc.RpcStub$RpcCallbackDispatcher $1.runInContext(RpcStub.java:1025) at com.google.tracing.TraceContext$TraceContextRunnable $1.run(TraceContext.java:444)
        at com.google.tracing.TraceContext.runInContext(TraceContext.java:684)
at com.google.tracing.TraceContext $ AbstractTraceContextCallback .runInInheritedContextNoUnref(TraceContext.java:322) at com.google.tracing.TraceContext $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java: 314) at com.google.tracing.TraceContext $TraceContextRunnable.run(TraceContext.java:442) at com.google.net.rpc.RpcStub $RpcCallbackDispatcher.rpcFinished(RpcStub.java:1046)
        at com.google.net.rpc.RPC.internalFinish(RPC.java:2047)
at com.google.net.rpc.impl.RpcNetChannel.finishRpc(RpcNetChannel.java: 2338) at com .google.net.rpc.impl.RpcNetChannel.messageReceived(RpcNetChannel.java: 1265) at com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java: 319) at com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java: 290)

This code is closed source and server side only so I was wondering if someone might be able to shed some light on the problem or suggest a workaround? My first thought was that perhaps the protocol buffers are different on the live servers to the dev servers.
I put the code up here: http://code.google.com/p/remote-datastore/
Thanks,
John

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

Reply via email to