java.lang.nosuchmethoderror:' boolean com.google.api.client.http.httptransport.ismtls()
这不是这
和 两个依赖性。但是在某种程度上,我得到了 java.lang.nosuchmethoderror:'boolean com.google.api.client.http.httptransport.ismtls()' 在com.google.api.services.bigquery.bigquery.bigquery $ builder.chooseendpoint(bigquery.java:6381)
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>${google.cloud.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.***.sharepoint</groupId>
<artifactId>sharepoint-util</artifactId>
<version>2.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
</dependency>
</dependencies>
我已经检查了依赖项树,没有jar的矛盾版本。 附加依赖树。我试图添加Maven中提供的范围,但其他BigQuery Imports因NoclassDeffound错误而失败。
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< AA>--------------
[INFO] Building AA 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]-----------------
----------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ AA
---
[INFO] *******g:jar:1.0-SNAPSHOT
[INFO] +- com.***.sharepoint:sharepoint-util:jar:2.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.4:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- org.json:json:jar:20180813:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | +- javax.mail:mail:jar:1.4.7:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO] | | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] | +- commons-cli:commons-cli:jar:1.4:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.3.1:compile
[INFO] | +- com.google.guava:guava:jar:30.1.1-jre:compile
[INFO] | +- com.google.cloud:google-cloud-storage:jar:2.0.1:compile
[INFO] | | +- com.google.apis:google-api-services-storage:jar:v1-rev20210127-1.32.1:compile
[INFO] | | \- com.google.auto.value:auto-value-annotations:jar:1.8.2:compile
[INFO] | \- org.apache.hadoop:hadoop-common:jar:2.7.3.2.6.5.0-292:compile
[INFO] | +- org.apache.hadoop:hadoop-annotations:jar:2.7.3.2.6.5.0-292:compile
[INFO] | +- org.apache.commons:commons-math3:jar:3.1.1:compile
[INFO] | +- xmlenc:xmlenc:jar:0.52:compile
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.26.hwx:compile
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1.26.hwx:compile
[INFO] | +- org.mortbay.jetty:jetty-sslengine:jar:6.1.26.hwx:compile
[INFO] | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | +- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] | +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] | | +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] | | \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] | +- com.sun.jersey:jersey-server:jar:1.9:compile
[INFO] | | \- asm:asm:jar:3.1:compile
[INFO] | +- log4j:log4j:jar:1.2.17:compile
[INFO] | +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
[INFO] | | \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
[INFO] | +- com.microsoft.azure:azure-storage:jar:5.4.0:compile
[INFO] | | \- com.microsoft.azure:azure-keyvault-core:jar:0.8.0:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | +- org.apache.avro:avro:jar:1.7.4:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | \- org.xerial.snappy:snappy-java:jar:1.0.4.1:compile
[INFO] | +- org.apache.hadoop:hadoop-auth:jar:2.7.3.2.6.5.0-292:compile
[INFO] | | +- com.nimbusds:nimbus-jose-jwt:jar:4.41.1:compile
[INFO] | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | +- net.minidev:json-smart:jar:1.3.1:compile
[INFO] | | +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
[INFO] | | | \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
[INFO] | | \- org.apache.curator:curator-framework:jar:2.7.1:compile
[INFO] | +- com.jcraft:jsch:jar:0.1.54:compile
[INFO] | +- org.apache.curator:curator-client:jar:2.7.1:compile
[INFO] | +- org.apache.curator:curator-recipes:jar:2.7.1:compile
[INFO] | +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.6.2.6.5.0-292:compile
[INFO] | | \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | \- org.tukaani:xz:jar:1.0:compile
[INFO] \- com.google.cloud:google-cloud-bigquery:jar:2.1.1:compile
[INFO] +- com.google.cloud:google-cloud-core:jar:2.0.5:compile
[INFO] +- com.google.protobuf:protobuf-java-util:jar:3.17.3:compile
[INFO] +- com.google.api.grpc:proto-google-common-protos:jar:2.3.2:compile
[INFO] +- com.google.api.grpc:proto-google-iam-v1:jar:1.0.14:compile
[INFO] +- com.google.auth:google-auth-library-credentials:jar:1.0.0:compile
[INFO] +- com.google.http-client:google-http-client-gson:jar:1.39.2:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:3.17.3:compile
[INFO] +- com.google.cloud:google-cloud-core-http:jar:2.0.5:compile
[INFO] +- com.google.api-client:google-api-client:jar:1.32.1:compile
[INFO] +- com.google.oauth-client:google-oauth-client:jar:1.31.5:compile
[INFO] +- com.google.http-client:google-http-client-apache-v2:jar:1.39.2:compile
[INFO] +- com.google.http-client:google-http-client-appengine:jar:1.39.2:compile
[INFO] +- com.google.api:gax-httpjson:jar:0.86.0:compile
[INFO] +- io.opencensus:opencensus-api:jar:0.28.0:compile
[INFO] +- io.grpc:grpc-context:jar:1.39.0:compile
[INFO] +- io.opencensus:opencensus-contrib-http-util:jar:0.28.0:compile
[INFO] +- com.google.http-client:google-http-client-jackson2:jar:1.39.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.12.4:compile
[INFO] +- com.google.http-client:google-http-client:jar:1.39.2:compile
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.15:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] +- com.google.auth:google-auth-library-oauth2-http:jar:1.0.0:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] +- com.google.apis:google-api-services-bigquery:jar:v2-rev20210726-1.32.1:compile
[INFO] +- com.google.api:api-common:jar:2.0.1:compile
[INFO] +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] +- org.checkerframework:checker-qual:jar:3.8.0:compile
[INFO] +- com.google.api:gax:jar:2.1.0:compile
[INFO] +- org.threeten:threetenbp:jar:1.5.1:compile
[INFO] \- com.google.errorprone:error_prone_annotations:jar:2.8.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.971 s
[INFO] Finished at: 2022-06-07T22:35:29+05:30
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "localDeploy" could not be activated because it does not exist.
This is not duplicate of this and this
my pom.xml has only two dependency .but somehow in run time i am getting
java.lang.NoSuchMethodError: 'boolean com.google.api.client.http.HttpTransport.isMtls()'
at com.google.api.services.bigquery.Bigquery$Builder.chooseEndpoint(Bigquery.java:6381)
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>${google.cloud.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.***.sharepoint</groupId>
<artifactId>sharepoint-util</artifactId>
<version>2.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
</dependency>
</dependencies>
i have checked in dependency tree there are no conflicting version of the jar.
attaching dependency tree. i have tried to add the scope as provided in maven but other bigquery imports are failing with noclassdeffound error.
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< AA>--------------
[INFO] Building AA 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]-----------------
----------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ AA
---
[INFO] *******g:jar:1.0-SNAPSHOT
[INFO] +- com.***.sharepoint:sharepoint-util:jar:2.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.4:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- org.json:json:jar:20180813:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | +- javax.mail:mail:jar:1.4.7:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] | +- commons-io:commons-io:jar:2.6:compile
[INFO] | +- com.squareup.okhttp:okhttp:jar:2.7.5:compile
[INFO] | | \- com.squareup.okio:okio:jar:1.6.0:compile
[INFO] | +- commons-cli:commons-cli:jar:1.4:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.3.1:compile
[INFO] | +- com.google.guava:guava:jar:30.1.1-jre:compile
[INFO] | +- com.google.cloud:google-cloud-storage:jar:2.0.1:compile
[INFO] | | +- com.google.apis:google-api-services-storage:jar:v1-rev20210127-1.32.1:compile
[INFO] | | \- com.google.auto.value:auto-value-annotations:jar:1.8.2:compile
[INFO] | \- org.apache.hadoop:hadoop-common:jar:2.7.3.2.6.5.0-292:compile
[INFO] | +- org.apache.hadoop:hadoop-annotations:jar:2.7.3.2.6.5.0-292:compile
[INFO] | +- org.apache.commons:commons-math3:jar:3.1.1:compile
[INFO] | +- xmlenc:xmlenc:jar:0.52:compile
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.26.hwx:compile
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1.26.hwx:compile
[INFO] | +- org.mortbay.jetty:jetty-sslengine:jar:6.1.26.hwx:compile
[INFO] | +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
[INFO] | +- com.sun.jersey:jersey-core:jar:1.9:compile
[INFO] | +- com.sun.jersey:jersey-json:jar:1.9:compile
[INFO] | | +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | \- javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO] | | +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
[INFO] | | \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
[INFO] | +- com.sun.jersey:jersey-server:jar:1.9:compile
[INFO] | | \- asm:asm:jar:3.1:compile
[INFO] | +- log4j:log4j:jar:1.2.17:compile
[INFO] | +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
[INFO] | | \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
[INFO] | +- com.microsoft.azure:azure-storage:jar:5.4.0:compile
[INFO] | | \- com.microsoft.azure:azure-keyvault-core:jar:0.8.0:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | | \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | +- org.apache.avro:avro:jar:1.7.4:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] | | \- org.xerial.snappy:snappy-java:jar:1.0.4.1:compile
[INFO] | +- org.apache.hadoop:hadoop-auth:jar:2.7.3.2.6.5.0-292:compile
[INFO] | | +- com.nimbusds:nimbus-jose-jwt:jar:4.41.1:compile
[INFO] | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | +- net.minidev:json-smart:jar:1.3.1:compile
[INFO] | | +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
[INFO] | | | +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
[INFO] | | | \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
[INFO] | | \- org.apache.curator:curator-framework:jar:2.7.1:compile
[INFO] | +- com.jcraft:jsch:jar:0.1.54:compile
[INFO] | +- org.apache.curator:curator-client:jar:2.7.1:compile
[INFO] | +- org.apache.curator:curator-recipes:jar:2.7.1:compile
[INFO] | +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
[INFO] | +- org.apache.zookeeper:zookeeper:jar:3.4.6.2.6.5.0-292:compile
[INFO] | | \- io.netty:netty:jar:3.7.0.Final:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO] | \- org.tukaani:xz:jar:1.0:compile
[INFO] \- com.google.cloud:google-cloud-bigquery:jar:2.1.1:compile
[INFO] +- com.google.cloud:google-cloud-core:jar:2.0.5:compile
[INFO] +- com.google.protobuf:protobuf-java-util:jar:3.17.3:compile
[INFO] +- com.google.api.grpc:proto-google-common-protos:jar:2.3.2:compile
[INFO] +- com.google.api.grpc:proto-google-iam-v1:jar:1.0.14:compile
[INFO] +- com.google.auth:google-auth-library-credentials:jar:1.0.0:compile
[INFO] +- com.google.http-client:google-http-client-gson:jar:1.39.2:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:3.17.3:compile
[INFO] +- com.google.cloud:google-cloud-core-http:jar:2.0.5:compile
[INFO] +- com.google.api-client:google-api-client:jar:1.32.1:compile
[INFO] +- com.google.oauth-client:google-oauth-client:jar:1.31.5:compile
[INFO] +- com.google.http-client:google-http-client-apache-v2:jar:1.39.2:compile
[INFO] +- com.google.http-client:google-http-client-appengine:jar:1.39.2:compile
[INFO] +- com.google.api:gax-httpjson:jar:0.86.0:compile
[INFO] +- io.opencensus:opencensus-api:jar:0.28.0:compile
[INFO] +- io.grpc:grpc-context:jar:1.39.0:compile
[INFO] +- io.opencensus:opencensus-contrib-http-util:jar:0.28.0:compile
[INFO] +- com.google.http-client:google-http-client-jackson2:jar:1.39.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.12.4:compile
[INFO] +- com.google.http-client:google-http-client:jar:1.39.2:compile
[INFO] +- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.15:compile
[INFO] +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
[INFO] +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] +- com.google.auth:google-auth-library-oauth2-http:jar:1.0.0:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] +- com.google.apis:google-api-services-bigquery:jar:v2-rev20210726-1.32.1:compile
[INFO] +- com.google.api:api-common:jar:2.0.1:compile
[INFO] +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] +- org.checkerframework:checker-qual:jar:3.8.0:compile
[INFO] +- com.google.api:gax:jar:2.1.0:compile
[INFO] +- org.threeten:threetenbp:jar:1.5.1:compile
[INFO] \- com.google.errorprone:error_prone_annotations:jar:2.8.1:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.971 s
[INFO] Finished at: 2022-06-07T22:35:29+05:30
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "localDeploy" could not be activated because it does not exist.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题是依赖性声明的顺序,因为我的SharePoint首先宣布它总是选择了首先加载的类。由于其在运行时被排除在外,因此排除标签也不会有所帮助。
The issue was order of dependency declaration, since my sharepoint declared first it always picked the class that got loaded first. The exclusion tag wont help as well , since its excluded at runtime.