java-samples icon indicating copy to clipboard operation
java-samples copied to clipboard

Exception in thread "main" java.lang.NoSuchMethodError while calling sheets API

Open prateek-infoobjects opened this issue 6 years ago • 0 comments
trafficstars

(Please fill out these details before submitting an issue)

Google sheet quickstart

Expected Behavior

Sheet API should be working smoothly.

Actual Behavior

Exception in thread "main" java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient$Builder.setBatchPath(Ljava/lang/String;)Lcom/google/api/client/googleapis/services/AbstractGoogleClient$Builder; at com.google.api.services.sheets.v4.Sheets$Builder.setBatchPath(Sheets.java:3143) at com.google.api.services.sheets.v4.Sheets$Builder.(Sheets.java:3122) at com.pansari.promoter.service.SheetQuickStart.main(SheetQuickStart.java:70)

Specifications

  • Java version (java -version) 1.8
  • OS Mac

POM changes: <groupId>com.google.apis</groupId> <artifactId>google-api-services-sheets</artifactId> v4-rev516-1.23.0 <groupId>com.google.api-client</groupId> <artifactId>google-api-client</artifactId> 1.23.0 <groupId>com.google.oauth-client</groupId> <artifactId>google-oauth-client-jetty</artifactId> 1.23.0

prateek-infoobjects avatar Nov 16 '19 10:11 prateek-infoobjects