在云中运行发电机插入时,我发现了一个神秘的异常,有关如何调试此类错误的任何帮助或线索?
背景
我正在运行的代码:
从我的本地机器运行时成功地将数据插入到 dynamodb 中,但是
通过 EMR 在云中运行 mapreduce 作业时,由于身份验证而突然失败。
使用 URL 端点进行身份验证。
我只是像这样创建凭据:
client=new DynamoDBClient(new BasicAWSCredentials(
"XXXX",
"XXXXXXXXXXX));
client.setEndpoint("https://dynamodb.eu-west-1.amazonaws.com");
我得到的例外如下:
Exception in thread "main" java.lang.NoSuchFieldError: requestHandlers
at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.init(AWSSecurityTokenServiceClient.java:214)
at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.<init>(AWSSecurityTokenServiceClient.java:160)
at com.amazonaws.auth.STSSessionCredentialsProvider.<init>(STSSessionCredentialsProvider.java:73)
at com.amazonaws.auth.SessionCredentialsProviderFactory.getSessionCredentialsProvider(SessionCredentialsProviderFactory.java:96)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.setEndpoint(AmazonDynamoDBClient.java:857)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.init(AmazonDynamoDBClient.java:262)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:181)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.<init>(AmazonDynamoDBClient.java:142)