0

I'm trying to use Google App Engine Remote API to connect to production datastore from my dev server. It seems like the first request is successful, and I do connect to the production datastore, but on subsequent requests it doesn't connect properly, and I'm getting this message:

remote API is already installed

This is the code I use to connect to Remote API:

try {
    RemoteApiOptions options = new RemoteApiOptions()
            .server("xxxxx.appspot.com", 80)
            .useServiceAccountCredential("xxxxx@appspot.gserviceaccount.com", 
                                         "WEB-INF/xxxxxx-xxxxxx.p12");
        RemoteApiInstaller installer = new RemoteApiInstaller();
        installer.install(options);
    } catch (Exception e) {
        System.out.println(e.getMessage());
    }

Not sure if it's relevant, but I use objectify to interact with the datastore

Moshe Shaham
  • 15,448
  • 22
  • 74
  • 114
  • Are you also using installer.uninstall(); after you've done all remote operations – Mark Doyle Apr 14 '16 at 09:09
  • @MarkDoyle no... i want all operations to be remote... – Moshe Shaham Apr 14 '16 at 10:44
  • Ideally somewhere in your code you should uninstall the remoteAPI. If by "dev server" you mean "dev appengine web server" then by each request because the remoteAPI installer installs itself by thread. I personally use remoteAPI and Objectify from a standalone java app, so that won't be the issue. – Mark Doyle Apr 15 '16 at 09:15

0 Answers0