无法初始化AmazonDynamoDBClient类

时间:2016-07-28 01:21:56

标签: java amazon-web-services amazon-dynamodb aws-sdk

我无法初始化AmazonDynamoDBClient类,我不知道为什么。它之前工作正常,但最近我得到了这个错误:

Caused by: java.lang.NoSuchFieldError: ThrottleException
at com.amazonaws.metrics.AwsSdkMetrics$MetricRegistry.<init>(AwsSdkMetrics.java:868)
at com.amazonaws.metrics.AwsSdkMetrics.<clinit>(AwsSdkMetrics.java:342)
at com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient.<clinit>(AmazonDynamoDBClient.java:244)

我正在尝试初始化的代码:

private static final String ACCESS_KEY = <access_key_here>;
private static final String SECRET_KEY = <secret_key_here>;
private static final AmazonDynamoDBClient DYNAMO_CLIENT = new AmazonDynamoDBClient(new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY)).withRegion(Regions.US_WEST_2);

0 个答案:

没有答案