当我尝试使用我的凭据初始化 amazon sqs 客户端时出现以下错误。
Exception in thread "main" java.lang.RuntimeException: Stub!
at org.apache.http.params.AbstractHttpParams.<init>(AbstractHttpParams.java:5)
at org.apache.http.params.BasicHttpParams.<init>(BasicHttpParams.java:6)
at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:73)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:111)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:60)
at com.amazonaws.services.sqs.AmazonSQSClient.<init>(AmazonSQSClient.java:151)
at com.amazonaws.services.sqs.AmazonSQSClient.<init>(AmazonSQSClient.java:132)
这是导致它的代码:
public class SQSControllerTest {
public static void main(String[] args) {
AmazonSQS sqs = new AmazonSQSClient(new BasicAWSCredentials("xxxx", "xxxx"));
}
}