目前我正在使用ApacheBeam2.18。GCP(数据流)中的0,我想将其更新为2.20。0
问题是,如果我使用2.20,我会出现以下错误。0而不是2.18。我的pom文件中的0:
Caused by: org.eclipse.aether.collection.UnsolvableVersionConflictException: Could not resolve version conflict among [com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-stub:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-auth:jar:1.28.1 -> io.grpc:grpc-api:jar:[1.28.1,1.28.1], com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-protobuf:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-protobuf:jar:1.28.1 -> io.grpc:grpc-protobuf-lite:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-netty-shaded:jar:1.28.1 -> io.grpc:grpc-core:jar:[1.28.1,1.28.1] -> io.grpc:grpc-api:jar:[1.28.1,1.28.1], com.google.cloud:google-cloud-kms:jar:1.38.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.cloud:google-cloud-datastore:jar:1.102.4 -> io.grpc:grpc-api:jar:1.28.1, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-bigquerystorage:jar:0.120.1-beta -> io.grpc:grpc-api:jar:1.25.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.cloud:google-cloud-bigtable:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.api.grpc:grpc-google-cloud-bigtable-v2:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-core-grpc:jar:1.92.2 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-spanner:jar:1.49.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> io.grpc:grpc-all:jar:1.25.0 -> io.grpc:grpc-api:jar:[1.25.0,1.25.0]]
我已经看到了其他类似的问题,但我看不到任何与apache梁的关系。
我应该添加或删除哪个依赖项?
这是我的pom文件的样子:
<modules>
...
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<beam.version>2.18.0</beam.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-exec-plugin.version>1.6.0</maven-exec-plugin.version>
<maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
<slf4j.version>1.7.25</slf4j.version>
...
</properties>
<repositories>
...
</repositories>
<dependencyManagement>
...
</dependencyManagement>
<build>
<plugins>
...
</plugins>
<pluginManagement>
...
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.101.0</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<version>1.49.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-kms</artifactId>
<version>1.34.0</version>
<exclusions>
<exclusion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core-grpc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>1.102.3</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
<exclusion>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-jdbc</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${autovalue.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${autovalue.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>postgres-socket-factory</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.12</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-api</artifactId>
<version>0.25.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
</dependencies>
如果我排除以下内容:
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<version>1.49.0</version>
<exclusions>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</exclusion>
</exclusions>
</dependency>
关于依赖项的错误消失了,但是,如果我这样做,我将无法完成项目的编译,因为我得到以下错误:
Caused by: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.expireAfterWrite(Ljava/time/Duration;)Lcom/google/common/cache/CacheBuilder;
所以看看这个消息,你有这三组依赖似乎是冲突的:
com.google.api:gax-grpc:jar:1.56.0 -> (...) -> io.grpc:grpc-api:jar:1.28.1
com.google.cloud:google-cloud-kms:jar:1.38.1 -> io.grpc:grpc-api:jar:1.28.1
com.google.cloud:google-cloud-datastore:jar:1.102.4 -> io.grpc:grpc-api:jar:1.28.1
org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> (...) -> io.grpc:grpc-api:jar:1.25.0
org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> (...) -> io.grpc:grpc-api:jar:1.26.0
因此,您似乎需要匹配这三个组(gax-grpc
,google-cloud-kms
,google-cloud-datastore
)。
您可以使用dependencyManagement强制GRPCAPI
和GRPCCore
版本围绕单个版本(1.26.0或1.28.1)。。。
我在使用commons-codec库时遇到(NoSuchMethodError)问题,这里有我的POM:`http://maven.apache.org/xsd/maven-4.0.0.xsd“>4.0.0 我使用了exclusions和dependencyManagement,但结果是相同的 有人能告诉我更好的解决这个问题的方法吗?
问题内容: (由Google翻译人员翻译)我搜索了Internet,到处都是人们在build.gradle中更改版本的地方。请帮帮我。 我已经准备好更新gms插件,但是我该怎么做? 请通过更新google- services插件的版本来解决版本冲突(有关最新版本的信息,请访问 https://bintray.com/android/android-tools/com.google.gms.goog
错误: 任务“:App:ProcessDebugGoogleServices”执行失败。请通过更新Google-Services插件的版本(关于最新版本的信息可以在这里获得)或更新com.google.android.gms的版本到8.3.0来修复版本冲突。 在应用程序gradle中
这就是我的应用程序gradle的样子 如果我将play services更改为9.0.0,一切都很好编译。我在这里漏掉了什么?
问题内容: 作为测试项目,我使用wsdl和jax- ws创建了一个非常简单的WebService。如果客户端作为GlassFish中的Web应用程序部署,则客户端运行得很好,但是如果我直接在Eclipse中启动相同的(WebService-)代码,则会收到以下错误: 经过研究,我发现它与某些版本的库文件有一定关系。所以现在我的问题是,如何才能“修复” Eclipse Java执行以正确运行我的We
我有一个Spark程序,它需要几个依赖项。 一个依赖项:a.jar是集群上的2.8版本,但是,我需要使用它的2.9版本。 每次启动程序时,spark都会自动从集群加载A2.8.jar,而不是加载,即使我已经通过提交了这个jar。 我尝试使用设置,但出现了另一个问题。在我的userClassPath中有一个“秘密”jar文件,比如“”,它不能与集群一起工作,而且有如此多的依赖项,我不知道哪个jar不