java.lang.SecurityException AWSCredentialsProvider 签名者信息不匹配
java.lang.SecurityException AWSCredentialsProvider Signer Information Does Not Match
我正在使用 2 个亚马逊提供的库:redshift-jdbc42-1.2.27.1051
和 aws-java-sdk-core-1.11.600
。两个库都在包 com.amazonaws.auth
下定义了一个 class AWSCredentialsProvider
。当我尝试使用我的应用程序时,出现此异常:
Caused by: java.lang.SecurityException: class "com.amazonaws.auth.AWSCredentialsProvider"'s signer information does not match signer information of other classes in the same package
我不知道如何解决这个问题。任何帮助将不胜感激!
我发现在 Amazon 的 Redshift JDBC 驱动程序文档中,他们说:
If you use the Amazon Redshift JDBC driver for database
authentication, you must have AWS SDK for Java 1.11.118 or later in
your Java class path. If you don't have AWS SDK for Java installed,
you can use a driver that includes the AWS SDK.
这个问题是因为我现在有两个库都提供的 AWS SDK 组件。现在,我不需要与驱动程序一起打包的 AWS SDK,因为我可以从 AWS S3 SDK 使用它。事实上,Amazon 鼓励开发人员在没有预打包 SDK 的情况下使用 Redshift JDBC 驱动程序:
Important
We strongly recommend using an Amazon Redshift JDBC driver that
doesn't include the AWS SDK if possible.
如果您运行遇到这个问题并且正在从 Maven 下载依赖项,您可以在此处找到非 aws-sdk 驱动程序:https://mvnrepository.com/artifact/com.amazon.redshift/redshift-jdbc42-no-awssdk
您可以使用 Athena 的 jdbc jar 文件中提到的相同 aws-java-sdk-core-1.11.***.jar。要找到athena的sdk版本,解压AthenaJDBC42.jar文件,你可以在pom文件\AthenaJDBC42\META-INF\maven\com.amazonaws\aws-java-sdk-core\pom.properties.
中找到版本
#Generated by Maven
#Tue Jun 02 12:03:54 IST 2020
**version=1.11.793**
groupId=com.amazonaws
artifactId=aws-java-sdk-core
在连接到 S3 存储桶时使用相同版本的 aws-java-sdk-core-1.11。793.jar 可以解决该问题。
我正在使用 2 个亚马逊提供的库:redshift-jdbc42-1.2.27.1051
和 aws-java-sdk-core-1.11.600
。两个库都在包 com.amazonaws.auth
下定义了一个 class AWSCredentialsProvider
。当我尝试使用我的应用程序时,出现此异常:
Caused by: java.lang.SecurityException: class "com.amazonaws.auth.AWSCredentialsProvider"'s signer information does not match signer information of other classes in the same package
我不知道如何解决这个问题。任何帮助将不胜感激!
我发现在 Amazon 的 Redshift JDBC 驱动程序文档中,他们说:
If you use the Amazon Redshift JDBC driver for database authentication, you must have AWS SDK for Java 1.11.118 or later in your Java class path. If you don't have AWS SDK for Java installed, you can use a driver that includes the AWS SDK.
这个问题是因为我现在有两个库都提供的 AWS SDK 组件。现在,我不需要与驱动程序一起打包的 AWS SDK,因为我可以从 AWS S3 SDK 使用它。事实上,Amazon 鼓励开发人员在没有预打包 SDK 的情况下使用 Redshift JDBC 驱动程序:
Important
We strongly recommend using an Amazon Redshift JDBC driver that doesn't include the AWS SDK if possible.
如果您运行遇到这个问题并且正在从 Maven 下载依赖项,您可以在此处找到非 aws-sdk 驱动程序:https://mvnrepository.com/artifact/com.amazon.redshift/redshift-jdbc42-no-awssdk
您可以使用 Athena 的 jdbc jar 文件中提到的相同 aws-java-sdk-core-1.11.***.jar。要找到athena的sdk版本,解压AthenaJDBC42.jar文件,你可以在pom文件\AthenaJDBC42\META-INF\maven\com.amazonaws\aws-java-sdk-core\pom.properties.
中找到版本#Generated by Maven
#Tue Jun 02 12:03:54 IST 2020
**version=1.11.793**
groupId=com.amazonaws
artifactId=aws-java-sdk-core
在连接到 S3 存储桶时使用相同版本的 aws-java-sdk-core-1.11。793.jar 可以解决该问题。