2
我使用這些代碼來連接SimpleDB和查詢數據。 我可以在SQL Scrap Book中運行查詢,結果是OK。 但是當我在Eclipse中運行它,我得到錯誤信息:關於Amazon SimpleDB,選擇功能
"12-18 22:01:57.401: I/com.amazonaws.request(402): Received error response: Status Code: 400, AWS Request ID: d68b7fcc-cd4a-7def-602c-96ad189d8fcf, AWS Error Code: NoSuchDomain, AWS Error Message: The specified domain does not exist."
你有任何想法?
//1. Creating a SimpleDB Client
AWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY_ID, SECRET_KEY);
AmazonSimpleDBClient sdbClient = new AmazonSimpleDBClient(credentials);
//2. Select
String nextToken = null;
SelectRequest selectRequest = new SelectRequest("select * from mydomain").withConsistentRead(true);
selectRequest.setNextToken(nextToken);
SelectResult response = sdbClient.select(selectRequest);
nextToken = response.getNextToken();