title: Dataflow fails with java.lang.NoSuchMethodError: io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)
body: <p>I'm trying to get a Dataflow job to run on Google Cloud. It always fails with: </p>
  
  <p>java.lang.NoSuchMethodError: io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)Lio/grpc/MethodDescriptor$Marshaller</p>
  
  <p>It's a maven project, here are my dependencies:</p>
  
  <pre><code>&lt;dependencies&gt;
    &lt;dependency&gt;
      &lt;groupId&gt;com.google.cloud.dataflow&lt;/groupId&gt;
      &lt;artifactId&gt;google-cloud-dataflow-java-sdk-all&lt;/artifactId&gt;
      &lt;version&gt;1.8.0&lt;/version&gt;
    &lt;/dependency&gt;   
    &lt;dependency&gt;
      &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
      &lt;artifactId&gt;google-cloud-pubsub&lt;/artifactId&gt;
      &lt;version&gt;0.4.0&lt;/version&gt;
    &lt;/dependency&gt;    
    &lt;dependency&gt;
      &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
      &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
      &lt;version&gt;3.0.0&lt;/version&gt;
    &lt;/dependency&gt;       
  &lt;/dependencies&gt;
  </code></pre>
  
  <p>I've tried a bunch of different dependency versions. What am I missing?</p>
  
  <p>It has the same result whether I run via exec:java or via a shade jar.</p>
  
  <p>Full stack trace:</p>
  
  <blockquote>
    <p>(e8dbd0c1b8b8a22): java.lang.NoSuchMethodError:
    io.grpc.protobuf.ProtoUtils.marshaller(Lcom/google/protobuf/Message;)Lio/grpc/MethodDescriptor$Marshaller;
    at com.google.iam.v1.IAMPolicyGrpc.(IAMPolicyGrpc.java:56) at
    com.google.cloud.pubsub.spi.v1.PublisherSettings$Builder.(PublisherSettings.java:487)
    at
    com.google.cloud.pubsub.spi.v1.PublisherSettings$Builder.createDefault(PublisherSettings.java:508)
    at
    com.google.cloud.pubsub.spi.v1.PublisherSettings$Builder.access$000(PublisherSettings.java:402)
    at
    com.google.cloud.pubsub.spi.v1.PublisherSettings.defaultBuilder(PublisherSettings.java:224)
    at
    com.google.cloud.pubsub.spi.DefaultPubSubRpc.(DefaultPubSubRpc.java:138)
    at
    com.google.cloud.pubsub.PubSubOptions$DefaultPubSubRpcFactory.create(PubSubOptions.java:60)
    at
    com.google.cloud.pubsub.PubSubOptions$DefaultPubSubRpcFactory.create(PubSubOptions.java:54)
    at com.google.cloud.ServiceOptions.rpc(ServiceOptions.java:399) at
    com.google.cloud.pubsub.PubSubImpl.(PubSubImpl.java:115) at
    com.google.cloud.pubsub.PubSubOptions$DefaultPubSubFactory.create(PubSubOptions.java:43)
    at
    com.google.cloud.pubsub.PubSubOptions$DefaultPubSubFactory.create(PubSubOptions.java:38)
    at com.google.cloud.ServiceOptions.service(ServiceOptions.java:391) at
    com.google.lindsaysmith.titan.DataflowBulkLoadNodes$SendPubSub.sendPubsubMessage(DataflowBulkLoadNodes.java:41)
    at
    com.google.lindsaysmith.titan.DataflowBulkLoadNodes$SendPubSub.processElement(DataflowBulkLoadNodes.java:32)
    at
    com.google.cloud.dataflow.sdk.util.SimpleDoFnRunner.invokeProcessElement(SimpleDoFnRunner.java:49)
    at
    com.google.cloud.dataflow.sdk.util.DoFnRunnerBase.processElement(DoFnRunnerBase.java:139)
    at
    com.google.cloud.dataflow.sdk.runners.worker.SimpleParDoFn.processElement(SimpleParDoFn.java:190)
    at
    com.google.cloud.dataflow.sdk.runners.worker.ForwardingParDoFn.processElement(ForwardingParDoFn.java:42)
    at
    com.google.cloud.dataflow.sdk.runners.worker.DataflowWorkerLoggingParDoFn.processElement(DataflowWorkerLoggingParDoFn.java:47)
    at
    com.google.cloud.dataflow.sdk.util.common.worker.ParDoOperation.process(ParDoOperation.java:55)
    at</p>
  </blockquote>