question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mvn build problem

See original GitHub issue

Please answer these questions before submitting your issue.

What version of gRPC are you using?

I use mvn to build my project and protobuf-mavne-plugin to generate code as the grpc-java/READMME.md guide. The config is shown below. I show all the pom files in next comment.

        <grpc-netty.version>1.3.0</grpc-netty.version>
        <grpc-protobuf.version>1.3.0</grpc-protobuf.version>
        <grpc-stub.version>1.3.0</grpc-stub.version>
            <!-- thirdparty -->
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-netty</artifactId>
                <version>${grpc-netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-protobuf</artifactId>
                <version>${grpc-protobuf.version}</version>
            </dependency>
            <dependency>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-stub</artifactId>
                <version>${grpc-stub.version}</version>
            </dependency>

What JVM are you using (java -version)?

openjdk version “1.8.0_131” OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

What did you do?

I want to creat a new project in Opendaylight which will use gRPC/protobuf. I creat a project framework. Becasue the proto file which I needed haven’t finished, so I copy the example/helloworld.proto and HelloWorldClient.java to my project, and then I try to build. But, it failed.

hll@hll:/home/opendaylight/project/p4plugin$ tree
.
├── parent
│   └── pom.xml
├── pom.xml
└── sbchannel
    ├── pom.xml
    └── src
        └── main
            ├── java
            │   └── HelloWorldClient.java
            └── proto
                └── helloworld.proto

What did you expect to see?

What’s the problem below? How to solve?

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] p4plugin-parent .................................... SUCCESS [  2.989 s]
[INFO] p4plugin-sbchannel ................................. FAILURE [  4.572 s]
[INFO] p4plugin-aggregator ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.661 s
[INFO] Finished at: 2017-06-01T16:37:37+08:00
[INFO] Final Memory: 58M/1332M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project p4plugin-sbchannel: Compilation failure: Compilation failure:
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[14,24] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[14,24] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[18,62] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[72,51] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[258,45] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[246,45] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[18,60] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[72,51] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[258,45] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[246,45] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[266,53] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[279,47] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[332,40] cannot find symbol
[ERROR] symbol:   class OneofDescriptor
[ERROR] location: class com.google.protobuf.Descriptors
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[266,53] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[279,47] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[332,40] cannot find symbol
[ERROR] symbol:   class OneofDescriptor
[ERROR] location: class com.google.protobuf.Descriptors
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloWorldProto.java:[20,43] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloWorldProto.java:[25,43] package com.google.protobuf.GeneratedMessageV3 does not exist
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[41,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
[ERROR] required: T
[ERROR] found: io.grpc.examples.helloworld.HelloReply
[ERROR] reason: inferred type does not conform to upper bound(s)
[ERROR] inferred: io.grpc.examples.helloworld.HelloReply
[ERROR] upper bound(s): com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/grpc-java/io/grpc/examples/helloworld/GreeterGrpc.java:[40,38] method marshaller in class io.grpc.protobuf.ProtoUtils cannot be applied to given types;
[ERROR] required: T
[ERROR] found: io.grpc.examples.helloworld.HelloRequest
[ERROR] reason: inferred type does not conform to upper bound(s)
[ERROR] inferred: io.grpc.examples.helloworld.HelloRequest
[ERROR] upper bound(s): com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[13,15] io.grpc.examples.helloworld.HelloRequest is not abstract and does not override abstract method getRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor,int) in com.google.protobuf.MessageOrBuilder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[497,51] getDefaultInstanceForType() in io.grpc.examples.helloworld.HelloRequest cannot implement getDefaultInstanceForType() in com.google.protobuf.MessageOrBuilder
[ERROR] return type io.grpc.examples.helloworld.HelloRequest is not compatible with com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[51,39] cannot find symbol
[ERROR] symbol:   method readStringRequireUtf8()
[ERROR] location: variable input of type com.google.protobuf.CodedInputStream
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[59,36] incompatible types: io.grpc.examples.helloworld.HelloRequest cannot be converted to com.google.protobuf.MessageLite
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[62,11] incompatible types: java.io.IOException cannot be converted to java.lang.String
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[64,7] cannot find symbol
[ERROR] symbol:   method makeExtensionsImmutable()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[126,26] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[131,16] cannot find symbol
[ERROR] symbol:   variable memoizedSize
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[136,34] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[138,5] cannot find symbol
[ERROR] symbol:   variable memoizedSize
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[149,14] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[161,9] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[162,14] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[168,26] cannot find symbol
[ERROR] symbol:   variable unknownFields
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[169,5] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[196,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[203,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[208,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[215,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[221,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[228,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[244,3] method does not override or implement a method from a supertype
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[257,23] io.grpc.examples.helloworld.HelloRequest.Builder is not abstract and does not override abstract method getUnknownFields() in com.google.protobuf.MessageOrBuilder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[300,53] getDefaultInstanceForType() in io.grpc.examples.helloworld.HelloRequest.Builder cannot implement getDefaultInstanceForType() in com.google.protobuf.MessageOrBuilder
[ERROR] return type io.grpc.examples.helloworld.HelloRequest is not compatible with com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[284,30] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[284,10] illegal start of type
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[289,7] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[307,15] cannot find symbol
[ERROR] symbol:   method newUninitializedMessageException(io.grpc.examples.helloworld.HelloRequest)
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[315,7] cannot find symbol
[ERROR] symbol:   method onBuilt()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[320,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[325,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[329,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[333,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[338,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[343,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[346,11] incompatible types: com.google.protobuf.Message cannot be converted to io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[347,68] incompatible types: com.google.protobuf.Message cannot be converted to io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[349,9] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[358,9] cannot find symbol
[ERROR] symbol:   method onChanged()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[360,7] cannot find symbol
[ERROR] symbol:   method onChanged()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[376,90] incompatible types: com.google.protobuf.MessageLite cannot be converted to io.grpc.examples.helloworld.HelloRequest
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[377,16] cannot find symbol
[ERROR] symbol:   method unwrapIOException()
[ERROR] location: variable e of type com.google.protobuf.InvalidProtocolBufferException
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[428,7] cannot find symbol
[ERROR] symbol:   method onChanged()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[437,7] cannot find symbol
[ERROR] symbol:   method onChanged()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[448,3] cannot find symbol
[ERROR] symbol:   method checkByteStringIsUtf8(com.google.protobuf.ByteString)
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[451,7] cannot find symbol
[ERROR] symbol:   method onChanged()
[ERROR] location: class io.grpc.examples.helloworld.HelloRequest.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[479,55] type argument io.grpc.examples.helloworld.HelloRequest is not within bounds of type-variable MessageType
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloRequest.java:[492,3] method does not override or implement a method from a supertype
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[13,15] io.grpc.examples.helloworld.HelloReply is not abstract and does not override abstract method getRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor,int) in com.google.protobuf.MessageOrBuilder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[497,49] getDefaultInstanceForType() in io.grpc.examples.helloworld.HelloReply cannot implement getDefaultInstanceForType() in com.google.protobuf.MessageOrBuilder
[ERROR] return type io.grpc.examples.helloworld.HelloReply is not compatible with com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[51,39] cannot find symbol
[ERROR] symbol:   method readStringRequireUtf8()
[ERROR] location: variable input of type com.google.protobuf.CodedInputStream
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[59,36] incompatible types: io.grpc.examples.helloworld.HelloReply cannot be converted to com.google.protobuf.MessageLite
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[62,11] incompatible types: java.io.IOException cannot be converted to java.lang.String
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[64,7] cannot find symbol
[ERROR] symbol:   method makeExtensionsImmutable()
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[126,26] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[131,16] cannot find symbol
[ERROR] symbol:   variable memoizedSize
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[136,34] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[138,5] cannot find symbol
[ERROR] symbol:   variable memoizedSize
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[149,14] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[161,9] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[162,14] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[168,26] cannot find symbol
[ERROR] symbol:   variable unknownFields
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[169,5] cannot find symbol
[ERROR] symbol:   variable memoizedHashCode
[ERROR] location: class io.grpc.examples.helloworld.HelloReply
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[196,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[203,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[208,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[215,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[221,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[228,31] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[244,3] method does not override or implement a method from a supertype
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[257,23] io.grpc.examples.helloworld.HelloReply.Builder is not abstract and does not override abstract method getUnknownFields() in com.google.protobuf.MessageOrBuilder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[300,51] getDefaultInstanceForType() in io.grpc.examples.helloworld.HelloReply.Builder cannot implement getDefaultInstanceForType() in com.google.protobuf.MessageOrBuilder
[ERROR] return type io.grpc.examples.helloworld.HelloReply is not compatible with com.google.protobuf.Message
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[284,30] cannot find symbol
[ERROR] symbol:   class GeneratedMessageV3
[ERROR] location: package com.google.protobuf
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[284,10] illegal start of type
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[289,7] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[307,15] cannot find symbol
[ERROR] symbol:   method newUninitializedMessageException(io.grpc.examples.helloworld.HelloReply)
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[315,7] cannot find symbol
[ERROR] symbol:   method onBuilt()
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[320,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[325,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder
[ERROR] /home/opendaylight/project/p4plugin/sbchannel/target/generated-sources/protobuf/java/io/grpc/examples/helloworld/HelloReply.java:[329,24] cannot find symbol
[ERROR] symbol:   variable super
[ERROR] location: class io.grpc.examples.helloworld.HelloReply.Builder

What did you see instead?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ejona86commented, Jun 5, 2017

It looks like an old version of protobuf is being used. You can just add an explicit dependency on protobuf. The protobuf runtime (protobuf-java) should never be older than the protoc version. Old generated code works with newer protobuf runtimes, but newer generated code may use features not present in old protobuf runtimes.

When using Maven it is a good idea to use requireUpperBoundDeps from Maven Enforcer plugin to detect cases where Maven is resolving dependencies incorrectly (or rather, as defined, but in an unhelpful way).

0reactions
dapengzhang0commented, Jun 2, 2017

I copied your files and removed some unused dependencies from parent/pom.xml and it works.

Modified parent/pom.xml

<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">

<modelVersion>4.0.0</modelVersion>
<groupId>org.opendaylight.p4plugin</groupId>
<artifactId>p4plugin-parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
    <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
    <controller.mdsal.version>1.6.0-SNAPSHOT</controller.mdsal.version>
    <mdsal.version>2.3.0-SNAPSHOT</mdsal.version>
    <mdsal.model.version>0.11.0-SNAPSHOT</mdsal.model.version>
    <yangtools.version>1.2.0-SNAPSHOT</yangtools.version>
    <config.version>0.7.0-SNAPSHOT</config.version>
    <grpc-netty.version>1.3.0</grpc-netty.version>
    <grpc-protobuf.version>1.3.0</grpc-protobuf.version>
    <grpc-stub.version>1.3.0</grpc-stub.version>
    <protobufGeneratorPath>${project.build.directory}/generated-source/protobuf</protobufGeneratorPath>
</properties>
<dependencyManagement>
    <dependencies>
        <!-- thirdparty -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty</artifactId>
            <version>${grpc-netty.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>${grpc-protobuf.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>${grpc-stub.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
        </plugin>
    </plugins>

    <pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${protobufGeneratorPath}</directory>
                            <includes>
                                <include>**</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${protobufGeneratorPath}</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
<plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.3.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                    </instructions>
                    <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
                </configuration>
            </plugin> 

            <!-- Ignore/Execute plugin execution -->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>properties-maven-plugin</artifactId>
                                    <versionRange>[0.0,)</versionRange>
                                    <goals>
                                        <goal>set-system-properties</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.jacoco</groupId>
                                    <artifactId>jacoco-maven-plugin</artifactId>
                                    <versionRange>[0.0,)</versionRange>
                                    <goals>
                                        <goal>prepare-agent</goal>
                                        <goal>pre-test</goal>
                                        <goal>post-test</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.ops4j.pax.exam</groupId>
                                    <artifactId>maven-paxexam-plugin</artifactId>
                                    <versionRange>[1.2.4,)</versionRange>
                                    <goals>
                                        <goal>generate-depends-file</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <execute>
                                        <runOnIncremental>false</runOnIncremental>
                                    </execute>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.groovy.maven</groupId>
                                    <artifactId>gmaven-plugin</artifactId>
                                    <versionRange>1.0</versionRange>
                                    <goals>
                                        <goal>execute</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-enforcer-plugin</artifactId>
                                    <versionRange>${enforcer.version}</versionRange>
                                    <goals>
                                        <goal>enforce</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore/>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
</project>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Maven build issue in Eclipse? Perform ... - Crunchify
How to fix Maven build issue in Eclipse? Perform maven-clean-install to fix any Java Dependency Issue · Let's get started: · Task-1: Perform...
Read more >
How to fix Maven, Maven Configuration and ... - Stack Overflow
Open terminal, goto the project folder where pom.xml is present and run mvn eclipse:eclipse command in terminal and refresh the project in ...
Read more >
IntelliJ IDEA - Troubleshooting common Maven issues
If you encounter problems working with your Maven project you can check to see if the following solutions and workarounds can help you...
Read more >
8 commands that help to resolve maven dependency problems
In your maven project, If the dependencies are placed not properly. This may result to create problems such as unused dependencies, ...
Read more >
Maven JAR Artifiact Dependency Search Not Working in Eclipse
How to Fix Maven Eclipse Dependency Problem · 1. Eclipse Maven Plugin Not able to add dependency by Searching artifacts · 3. Eclipse...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found