0
我使用Java按照本教程來實現remoteAPi在谷歌的App Engine(GAE): https://developers.google.com/appengine/docs/java/tools/remoteapi超時而獲取的remoteApi GAE
但在配置在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 /指數。原因:
Timeout while fetching: http://localhost:8888/remote_api
我認爲在調試並知道它造成的: 「installer.install(選項);」聲明。
我該如何解決這個問題?增加套接字超時?
提前致謝!