question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google-cloud-language: No such Method Error on gax grpc

See original GitHub issue

I used a service account authentication, through an environment variable.

Using this pom configuration:

<dependency>
    		<groupId>com.google.api</groupId>
    		<artifactId>gax</artifactId>
    		<version>1.8.1</version>
		</dependency>
 <dependency>
		 <groupId>com.google.api</groupId>
		  <artifactId>gax-grpc</artifactId>
		  <version>0.25.1</version>
</dependency>    
<dependency>
    		<groupId>com.google.cloud</groupId>
    		<artifactId>google-cloud-language</artifactId>
   		 <version>0.25.0-beta</version>
</dependency>

I had to manually add gax libs, because dependencies were not resolved by the google-cloud-language pom.

I get this error, at run time, trying to execute the example from the Google Natural Language description page :

Root Exception stack trace:
java.lang.NoSuchMethodError: com.google.api.gax.grpc.InstantiatingChannelProvider$Builder.setEndpoint(Ljava/lang/String;)Lcom/google/api/gax/grpc/InstantiatingChannelProvider$Builder;
	at com.google.cloud.language.v1.LanguageServiceSettings.defaultGrpcChannelProviderBuilder(LanguageServiceSettings.java:151)
	at com.google.cloud.language.v1.LanguageServiceSettings.defaultGrpcTransportProviderBuilder(LanguageServiceSettings.java:158)
	at com.google.cloud.language.v1.LanguageServiceSettings.defaultTransportProvider(LanguageServiceSettings.java:162)
	at com.google.cloud.language.v1.LanguageServiceSettings$Builder.createDefault(LanguageServiceSettings.java:291)
	at com.google.cloud.language.v1.LanguageServiceSettings$Builder.access$000(LanguageServiceSettings.java:219)
	at com.google.cloud.language.v1.LanguageServiceSettings.newBuilder(LanguageServiceSettings.java:192)
	at com.google.cloud.language.v1.LanguageServiceClient.create(LanguageServiceClient.java:109)

Any hint to solve this ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
KandasamySuryacommented, Apr 13, 2019

Incorporating a method to connect to spanner db in java … am frequently getting com.google.api.gax.core.GaxProperties.getLibraryVersion(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/String errors. Please help

0reactions
pongadcommented, Jan 19, 2018

Looks like the issue has been resolved. I’ll close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cloud Vision API Exception in thread "main" java.lang ...
I tried using different Guava (22.0 and 23.6) and HttpCore (5.0 and 4.4. 8) versions than the ones already being used on the...
Read more >
Namespace Google.Api.Gax.Grpc (4.0.0) | .NET client library
This class is immutable. RpcExceptionExtensions. Utility extension methods to make it easier to retrieve extended error information from an .
Read more >
java.lang.NoSuchMethodError: io.netty.util.AttributeKey.value ...
ryan.t...@dowjones.com · I'm getting · java.lang.NoSuchMethodError: io.netty.util. · at io.grpc.netty.NettyChannelBuilder$NettyTransportFactory. · at io.grpc.netty.
Read more >
cmaan / google-cloud-java Download - JitPack
To do this, follow the instructions on the authentication document shared by all the Google Cloud language libraries. Next, choose a method for ......
Read more >
LanguageServiceClient (Google Cloud 0.104.0-alpha API)
Service Description: Provides text analysis operations such as sentiment analysis ... This type of method takes no parameters and returns an immutable API ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found