1

I develop app using scala for download encrypted file from GCS (encrypted file using customer-supplied encryption keys) by service account credentials on hdfs

val path = new Path(keyfile)

val fs = FileSystem.get(path.toUri, spark.sparkContext.hadoopConfiguration)

val storage = StorageOptions.newBuilder.setCredentials(ServiceAccountCredentials.fromStream(fs.open(path))).build.getService

I found the error

Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)
Uwe Allner
  • 3,399
  • 9
  • 35
  • 49
Unknown
  • 21
  • 1
  • This is probably related to a conflict of Guava versions (2 dependencies depending on different versions of Guava). Can you show us the dependency tree (included and excluded dependencies)? – norbjd Jul 01 '19 at 11:38
  • Can you show us complete error information and dependencies? [You may also check similar error question here](https://stackoverflow.com/questions/42206440/java-lang-nosuchmethoderror-com-google-common-base-preconditions-checkargument) – Pawel Czuczwara Jul 03 '19 at 07:58

1 Answers1

0

A NoSuchMethodError occurs when we’re calling a method that does not exist at runtime, The method must have existed at compile time.

Verify the dependency versions. Try to find out where the method is being called.