I'm using Java to implement remoteAPi in Google App Engine (GAE) by following this tutorial: https://developers.google.com/appengine/docs/java/tools/remoteapi
but after configuring at web.xml, I use the following codes to insert new entity to local datastore:
String username = "myusername";
String password = "mypassword";
RemoteApiOptions options = new RemoteApiOptions()
.server("localhost", 8888)
.credentials(username, password);
RemoteApiInstaller installer = new RemoteApiInstaller();
installer.install(options);
try {
DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
System.out.println("Key of new entity is " +
ds.put(new Entity("Hello Remote API!")));
} finally {
installer.uninstall();
}
but error has occured:
Problem accessing /remoteApi/index. Reason:
Timeout while fetching: http://localhost:8888/remote_api
I viewed on debug and know that it caused by : "installer.install(options);" statement.
How can I solve this? Increase the socket time out ?
Thank in advance !