profile
viewpoint

Ask questionsGoogle-cloud-language: No such Method Error on gax grpc

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 ?

googleapis/google-cloud-java

Answer questions KandasamySurya

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

useful!

Related questions

Dialogflow V2, Springboot Dialogflow Library calls are failing ::: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative] hot 2
PubSub: grpc Uncaught exception in the SynchronizationContext. Panic! - Could not find LoadBalancer pick_first hot 2
Pubsub Subscriber initialization crashes JVM on Alpine Linux with libc6-compat hot 1
Duplicate classes error when adding dialogflow dependency 0.98.0-alpha along with firebase hot 1
The newest version of google-cloud-speech jar bug report hot 1
Firestore: Quickstart throws IllegalStateException: Could not find policy 'pick_first' hot 1
Firestore: should library handle/retry UNAVAILABLE errors? hot 1
PubSub: grpc Uncaught exception in the SynchronizationContext. Panic! - Could not find LoadBalancer pick_first hot 1
java.lang.NoSuchMethodError on Google PubSub Publisher.newBuilder().build() hot 1
Error reporting from GCE fails due to auth issues hot 1
Dependency conflict with KMS when running Spark code in Dataproc hot 1
Memory leak from netty/Deadline exceeded after 9999961477ns hot 1
BigQuery: Create new Table using schema from json file hot 1
Unable to make GRPC call in 32bit Windows Machine hot 1
PubSub: grpc Uncaught exception in the SynchronizationContext. Panic! - Could not find LoadBalancer pick_first hot 1
Github User Rank List