Closed mgenov closed 7 years ago
Hello Miroslav,
A quick check: is com.google.protobuf:protobuf-java
included in your compile dependencies? This is where google.protobuf.Empty
is packaged.
Kind regards, Sergei
I've tried version 3.0.0 and 3.3.1 and it doesn't resolve the issue. This is how my dependency tree looks:
Can you reproduce it in a small-scale sample project? I am pretty sure something trivial is missing from your configuration, but I do not have enough information to tell what it is exactly.
It was a silly mistake. I've forgot to include the import path in my proto definition:
import "google/protobuf/empty.proto";
and this was the cause.
Thanks for your feedback @sergei-ivanov
I suspected something like that :) I am glad your issue has been resolved.
Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.4.0
What JVM are you using (
java -version
)?java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)
protoc version
libprotoc 3.3.0
Properties
Plugin definition
Extensions
What did you do?
mvn clean compile
What did you expect to see?
BUILD SUCCESS
What did you see instead?
[INFO] Compiling 2 proto file(s) to ..../target/generated-sources/protobuf/java [ERROR] PROTOC FAILED: myservice.proto:40:59: "google.protobuf.Empty" is not defined.
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------
I'm I able to resolve it or I have to define my own Empty message ?
Note that the google.api.http type is resolved successfully.