gpt4 book ai didi

java - AWS 开发工具包 v2 STS - BootstrapMethodError : call site initialization exception caused by LamdaConversionException

转载 作者:行者123 更新时间:2023-12-04 12:38:48 26 4
gpt4 key购买 nike

我正在尝试使用 STS 服务进行登机,但收到 LambdaConversionException @resolveCredentials

StsClient stsClient = StsClient.builder().credentialsProvider(sp_StaticCredentialsProvider).build();
StsAssumeRoleCredentialsProvider assumeRoleCredentialProvider =
StsAssumeRoleCredentialsProvider.builder()
.stsClient(stsClient)
.refreshRequest(assumeRoleRequest)
.build();
AwsCredentials clientCredentials = assumeRoleCredentialProvider.resolveCredentials();

我依赖于以下工件
  • software.amazon.awssdk - 2.9.16
  • software.amazon.awssdk - sts - 2.9.16
  • org.apache.httpcomponents - httpclient - 4.5.10
  • org.apache.httpcomponents - httpcore - 4.4.12

  • 异常堆栈跟踪
    Exception in thread "main" java.lang.BootstrapMethodError: call site initialization exception
    at software.amazon.awssdk.services.sts.auth.StsCredentialsProvider.resolveCredentials(StsCredentialsProvider.java:78)
    at software.amazon.awssdk.services.sts.auth.StsAssumeRoleCredentialsProvider.resolveCredentials(StsAssumeRoleCredentialsProvider.java:42)
    at com.silverpeak.gms.server2.manager.thirdPartyTunnels.AWSGlobalInterconnectTest.main(AWSGlobalInterconnectTest.java:43)
    Caused by: java.lang.invoke.LambdaConversionException: Invalid receiver type interface org.apache.http.Header; not a subtype of implementation type interface org.apache.http.NameValuePair

    感谢任何帮助。

    最佳答案

    升级到最新版本httpcore

    <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
    <dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    <version>4.4.14</version>
    </dependency>
    我相信它现在一定已经解决了,把它张贴在这里供同船的其他人使用。

    关于java - AWS 开发工具包 v2 STS - BootstrapMethodError : call site initialization exception caused by LamdaConversionException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58419212/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com