2011-11-24 337 views
0

我在使用Spring 3.0中的RestTemplate時遇到問題。 當我試圖要求在谷歌appengine應用程序中的其他應用程序它超時5秒。ResourceAccessException:I/O錯誤:獲取時超時:RestTemplate

我的客戶端應用程序和服務器應用程序都是在谷歌應用程序引擎,

下面是客戶端代碼:

RestTemplate restTemplate = new RestTemplate(); 
    restTemplate.postForObject(pUrl , paramObj , String.class) 

例外:

org.springframework.web.client.ResourceAccessException: I/O error: Timeout while fetching: http://naresh-app.appspot.com/HistoryAction/getHistory.json; nested exception is java.net.SocketTimeoutException: Timeout while fetching: http://naresh-app.appspot.com/HistoryAction/getHistory.json 

任何幫助嗎?

在此先感謝。:)

+0

你設置套接字超時的東西真的低? – dmon

回答

0

連接到互聯網是好的嗎?我想你以後只能處理異常和復古。

+0

我的互聯網是好的,所有的請求都在5秒 – tan

+0

它固定停止,它與REST API的問題,更新之後工作正常:) – tan