Hi , I am new to gRPC / protobuf.
This is my first .proto file :
syntax = "proto3";
option java_package = "destiny.identity.services.grpc";
service EchoService {
rpc echo (EchoRequest) returns (EchoReply) {}
}
message EchoRequest {
string name=1;
}
message EchoReply {
string message = 1;
}
It is simple , but the generated EchoServiceOuterClass.java has a lot of
incompatibilities :
~/destiny-identity/target/generated-sources/protobuf/java/destiny/identity/services/grpc/EchoServiceOuterClass.java
Error:(83, 13) java: incompatible types: java.io.IOException cannot be
converted to java.lang.String
Error:(152, 18) java: memoizedSize has private access in
com.google.protobuf.AbstractMessage
Error:(159, 7) java: memoizedSize has private access in
com.google.protobuf.AbstractMessage
Error:(394, 18) java: cannot find symbol
symbol: method unwrapIOException()
location: variable e of type
com.google.protobuf.InvalidProtocolBufferException
Error:(586, 13) java: incompatible types: java.io.IOException cannot be
converted to java.lang.String
Error:(655, 18) java: memoizedSize has private access in
com.google.protobuf.AbstractMessage
Error:(662, 7) java: memoizedSize has private access in
com.google.protobuf.AbstractMessage
Error:(897, 18) java: cannot find symbol
symbol: method unwrapIOException()
location: variable e of type
com.google.protobuf.InvalidProtocolBufferException
This is my [ partial ] pom.xml
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.5.0</version>
<configuration>
<!--
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.
-->
<protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compile-custom</goal>
</goals>
</execution>
</executions>
</plugin>
The* grpc-netty , grpc-protobuf , grpc-stub* are all of version of 1.0.0
Where goes wrong here ?
Thanks.
(I don't know whether the problem is related to protobuf or gRPC , so I
paste to both forum )
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.