This was resolved in https://github.com/grpc/grpc-java/issues/2300. There
was an older protobuf getting included in the application, which was
causing trouble.
On Monday, September 26, 2016 at 8:51:04 AM UTC-7, Smallufo Huang wrote:
>
> 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.
>
>
--
You received this message because you are subscribed to the Google Groups
"grpc.io" 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/grpc-io.
To view this discussion on the web visit
https://groups.google.com/d/msgid/grpc-io/f114042d-f866-4ffa-981e-f2f48b69a1e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.