我试图在登机时使用STS服务,但收到LambdaConversionException @resolveCredentials
StsClient stsClient = StsClient.builder().credentialsProvider(sp_StaticCredentialsProvider).build();
StsAssumeRoleCredentialsProvider assumeRoleCredentialProvider =
StsAssumeRoleCredentialsProvider.builder()
.stsClient(stsClient)
.refreshRequest(assumeRoleRequest)
.build();
AwsCredentials clientCredentials = assumeRoleCredentialProvider.resolveCredentials();
我对以下工件有依赖性
异常堆栈跟踪
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
感谢任何帮助。
答案 0 :(得分:1)
升级到最新版本的httpcore
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.14</version>
</dependency>
我相信 op 现在一定已经解决了,把它贴在这里给同船的其他人。