+Feng Xiao <[email protected]>

On Mon, Sep 26, 2016 at 10:56 AM Smallufo Huang <[email protected]> wrote:

> I am new to gRPC , this is my simple .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;
> }
>
>
> when compiles , the generated EchoServiceOuterClass.java has a lot of
> incompatibilities :
>
> 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
>
> What may be wrong ?
>
> This is my 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>
>
>
> And the io.grpc's grpc-netty , grpc-protobuf , grpc-stub are all version
> of 1.0.0
>
>
> --
> 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.
>

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

Reply via email to