title: NoSuchMethodError while reading from google cloud storage from Dataproc using java
body: <p>This is my method to read the cloud storage file</p>
  
  <pre><code>public static String getStringObject(String bucketName, String fileName) throws Exception{
          BlobId blobId = BlobId.of(bucketName, fileName);
          byte[] content = storage.readAllBytes(blobId);
          String contentString = new String(content, UTF_8);
          return contentString;
      }
  </code></pre>
  
  <p>When I call this method from my dev environment to read a file from the bucket, it works fine. But when I call this method from Dataproc cluster while running a spark job, it throws the following Error.</p>
  
  <pre><code>Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;
      at com.google.api.gax.retrying.BasicRetryingFuture.&lt;init&gt;(BasicRetryingFuture.java:77)
      at com.google.api.gax.retrying.DirectRetryingExecutor.createFuture(DirectRetryingExecutor.java:75)
      at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:53)
      at com.google.cloud.storage.StorageImpl.readAllBytes(StorageImpl.java:460)`
  </code></pre>
  
  <p>Here is parts of my maven pom.xml</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;google-cloud-storage&lt;/artifactId&gt;
              &lt;version&gt;1.4.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
      &lt;artifactId&gt;guava&lt;/artifactId&gt;
      &lt;version&gt;19.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.google.api-client&lt;/groupId&gt;
      &lt;artifactId&gt;google-api-client&lt;/artifactId&gt;
      &lt;version&gt;1.22.0&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>What am i doing wrong here ?</p>