AmazonSQSClientBuilder.defaultClient () java.lang.NoSuchFieldError: Нет статического поля INSTANCE типа Lorg / apache / http / conn / ssl / AllowAllHostnameVerifier - PullRequest
1 голос
/ 03 ноября 2019

java.lang.RuntimeException: Невозможно запустить действие. ComponentInfo {com.example.msgqueue3 / com.example.msgqueue3.MainActivity}: java.lang.NullPointerException: Попытка вызвать метод интерфейса com.amazonaws.services.sqs. model.CreateQueueResult com.amazonaws.services.sqs.AmazonSQS.createQueue (com.amazonaws.services.sqs.model.CreateQueueRequest) 'для ссылки на пустой объект

проблема соединения AWS SQS

1 Ответ

0 голосов
/ 04 ноября 2019

работает.

     ProfileCredentialsProvider credentialsProvider = new ProfileCredentialsProvider();

    try {

        credentialsProvider.getCredentials();
    } catch (Exception e) {
        throw new AmazonClientException(
                "Cannot load the credentials from the credential profiles file. " +
                        "Please make sure that your credentials file is at the correct " +
                        "location (~/.aws/credentials), and is in valid format.",
                e);

    }
    AmazonSQS sqs = AmazonSQSClientBuilder.standard()
            .withCredentials(credentialsProvider)
            .withRegion(Regions.US_WEST_2)
            .build();
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...