このチュートリアルに従って、Javaを使用してGoogle App Engine(GAE)にremoteAPiを実装しています: https ://developers.google.com/appengine/docs/java/tools/remoteapi
しかし、web.xmlで構成した後、次のコードを使用して新しいエンティティをローカルデータストアに挿入します。
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();
}
しかし、エラーが発生しました:
/ remoteApi/indexへのアクセスに問題があります。理由:
Timeout while fetching: http://localhost:8888/remote_api
デバッグを確認したところ、「installer.install(options);」が原因であることがわかりました。声明。
どうすればこれを解決できますか?ソケットのタイムアウトを増やしますか?
少し早いですがお礼を !