Facing NoSuchMethodError for io.netty.util.AttributeKey.valueOf() method with grpc and protobuf Hello world example
<p>After running GreetingServerTest.java tests I am getting below given errors. I am using grpc 1.1.0-SNAPSHOT libraries and trying to implement basic Helloword example of grpc given in there git repo. Can anybody please suggest which libraries I am missing or there's anything else I need to do.</p>

<pre><code>java.lang.NoSuchMethodError: io.netty.util.AttributeKey.valueOf(Ljava/lang/Class;Ljava/lang/String;)Lio/netty/util/AttributeKey;
at io.grpc.netty.Utils.&lt;clinit&gt;(Utils.java:87)
at io.grpc.netty.NettyServer.allocateSharedGroups(NettyServer.java:187)
at io.grpc.netty.NettyServer.start(NettyServer.java:116)
at io.grpc.internal.ServerImpl.start(ServerImpl.java:156)
at io.grpc.internal.ServerImpl.start(ServerImpl.java:83)
at com.xyz.communication.datacollection.GrpcServerTest.test(GrpcServerTest.java:23)
</code></pre>

<p>pom.xml</p>

<pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
&lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
&lt;groupId&gt;org.springframework.samples&lt;/groupId&gt;
&lt;artifactId&gt;InternodeCommunication&lt;/artifactId&gt;
&lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;

&lt;properties&gt;
    &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
    &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;

    &lt;!-- Spring --&gt;
    &lt;spring-framework.version&gt;4.3.1.RELEASE&lt;/spring-framework.version&gt;

    &lt;!-- Logging --&gt;
    &lt;logback.version&gt;1.0.13&lt;/logback.version&gt;
    &lt;slf4j.version&gt;1.7.5&lt;/slf4j.version&gt;

    &lt;!-- Kundera JPA --&gt;
    &lt;kundera-version&gt;3.4&lt;/kundera-version&gt;

    &lt;!-- Hibernate jpa --&gt;
    &lt;hibernate.version&gt;4.2.1.Final&lt;/hibernate.version&gt;


    &lt;!-- Test --&gt;
    &lt;junit.version&gt;4.12&lt;/junit.version&gt;
    &lt;grpc.version&gt;1.1.0-SNAPSHOT&lt;/grpc.version&gt;
    &lt;!-- Generic properties --&gt;
&lt;/properties&gt;

&lt;dependencies&gt;
    &lt;!-- Spring and Transactions --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
        &lt;version&gt;${spring-framework.version}&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;!-- Hibernate --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
        &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
        &lt;version&gt;${hibernate.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- kafka --&gt;
    &lt;!-- https://mvnrepository.com/artifact/org.apache.kafka/kafka_2.10 --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.apache.kafka&lt;/groupId&gt;
        &lt;artifactId&gt;kafka_2.10&lt;/artifactId&gt;
        &lt;version&gt;0.10.0.0&lt;/version&gt;
        &lt;exclusions&gt;
            &lt;exclusion&gt;
                &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
            &lt;/exclusion&gt;
            &lt;exclusion&gt;
                &lt;groupId&gt;log4j&lt;/groupId&gt;
                &lt;artifactId&gt;log4j&lt;/artifactId&gt;
            &lt;/exclusion&gt;
        &lt;/exclusions&gt;

    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.xyz&lt;/groupId&gt;
        &lt;artifactId&gt;Common&lt;/artifactId&gt;
        &lt;version&gt;0.0.1-SNAPSHOT&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;18.0&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;io.netty&lt;/groupId&gt;
        &lt;artifactId&gt;netty-all&lt;/artifactId&gt;
        &lt;version&gt;4.1.5.Final&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;dependency&gt;
        &lt;groupId&gt;io.grpc&lt;/groupId&gt;
        &lt;artifactId&gt;grpc-netty&lt;/artifactId&gt;
        &lt;version&gt;${grpc.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;io.grpc&lt;/groupId&gt;
        &lt;artifactId&gt;grpc-protobuf&lt;/artifactId&gt;
        &lt;version&gt;${grpc.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;io.grpc&lt;/groupId&gt;
        &lt;artifactId&gt;grpc-stub&lt;/artifactId&gt;
        &lt;version&gt;${grpc.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.grpc/grpc-all --&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.netty/netty-codec --&gt;
    &lt;!-- https://mvnrepository.com/artifact/io.netty/netty-all --&gt;




    &lt;!-- Test Artifacts --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.springframework&lt;/groupId&gt;
        &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
        &lt;version&gt;${spring-framework.version}&lt;/version&gt;
        &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;${junit.version}&lt;/version&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;com.xyz&lt;/groupId&gt;
        &lt;artifactId&gt;Common&lt;/artifactId&gt;
        &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
        &lt;type&gt;test-jar&lt;/type&gt;
        &lt;scope&gt;test&lt;/scope&gt;
    &lt;/dependency&gt;

&lt;/dependencies&gt;
&lt;build&gt;
    &lt;extensions&gt;
        &lt;extension&gt;
            &lt;groupId&gt;kr.motd.maven&lt;/groupId&gt;
            &lt;artifactId&gt;os-maven-plugin&lt;/artifactId&gt;
            &lt;version&gt;1.4.1.Final&lt;/version&gt;
        &lt;/extension&gt;
    &lt;/extensions&gt;
    &lt;plugins&gt;
        &lt;plugin&gt;
            &lt;groupId&gt;org.xolstice.maven.plugins&lt;/groupId&gt;
            &lt;artifactId&gt;protobuf-maven-plugin&lt;/artifactId&gt;
            &lt;version&gt;0.5.0&lt;/version&gt;
            &lt;configuration&gt;
                &lt;!-- The version of protoc must match protobuf-java. If you don't depend 
                    on protobuf-java directly, you will be transitively depending on the protobuf-java 
                    version that grpc depends on. --&gt;
                &lt;protocArtifact&gt;com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}&lt;/protocArtifact&gt;
                &lt;pluginId&gt;grpc-java&lt;/pluginId&gt;
                &lt;pluginArtifact&gt;io.grpc:protoc-gen-grpc-java:1.1.0-SNAPSHOT:exe:${os.detected.classifier}&lt;/pluginArtifact&gt;
            &lt;/configuration&gt;
            &lt;executions&gt;
                &lt;execution&gt;
                    &lt;goals&gt;
                        &lt;goal&gt;compile&lt;/goal&gt;
                        &lt;goal&gt;compile-custom&lt;/goal&gt;
                    &lt;/goals&gt;
                &lt;/execution&gt;
            &lt;/executions&gt;
        &lt;/plugin&gt;
    &lt;/plugins&gt;
&lt;/build&gt;
</code></pre>

<p></p>

<p>hello_world.proto file</p>

<pre><code>syntax = "proto3";
option java_multiple_files = true;
package com.xyz.communication.example;
message HelloRequest {
 string name = 1;
}
message HelloResponse {
  string greeting = 1;
}
service GreetingService {
   rpc greeting(HelloRequest) returns (HelloResponse);
}
</code></pre>

<p>GreetingServerTest.java </p>

<pre><code>@ContextConfiguration("/communication-test-beans.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class GrpcServerTest {
    @Test
    public void test() throws IOException, InterruptedException {
        io.grpc.Server server = ServerBuilder.forPort(8080).addService(new GrpcServerImpl().bindService()).build();
        server.start();
        server.awaitTermination();
    }
}

class GrpcServerImpl extends GreetingServiceGrpc.GreetingServiceImplBase {
    @Override
    public void greeting(HelloRequest request, StreamObserver&lt;HelloResponse&gt; responseObserver) {
        HelloResponse response = HelloResponse.newBuilder().setGreeting("Hello " + request.getName()).build();
        responseObserver.onNext(response);
        responseObserver.onCompleted();
    }

    @Override
    public ServerServiceDefinition bindService() {
        return super.bindService();
    }
}
</code></pre>