You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/09/22 09:14:52 UTC

[GitHub] [dubbo] vio-lin commented on issue #8875: 调试 grpoc 代码生成器的时候 总是抛错 org.apache.dubbo.gen.dubbo.DubboGenerator 输入参数是啥 proto的文件吗

vio-lin commented on issue #8875:
URL: https://github.com/apache/dubbo/issues/8875#issuecomment-924738777


   倒是没有报错。 
   org.apache.dubbo.gen.grpc.DubboGrpcGenerator dubbo的的代码里面生成grpc  代码的 maven插件代码  
   ```
   public class DubboGrpcGenerator extends AbstractGenerator {
   
       public static void main(String[] args) {
           if (false) {
               ProtocPlugin.generate(new DubboGrpcGenerator());
           } else {
               ProtocPlugin.debug(new DubboGrpcGenerator(),"D:\\Users\\guo.lin\\git\\cdubbo\\cdubbo-demo3\\src\\main\\proto\\Greeter.proto");
           }
       }
   }
   ```
   我传递proto 文件进去 然后有如下报错
   ```
   com.google.protobuf.InvalidProtocolBufferException$InvalidWireTypeException: Protocol message tag had invalid wire type.
   	at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:115)
   	at com.google.protobuf.UnknownFieldSet$Builder.mergeFieldFrom(UnknownFieldSet.java:551)
   	at com.google.protobuf.UnknownFieldSet$Builder.mergeFrom(UnknownFieldSet.java:514)
   	at com.google.protobuf.UnknownFieldSet$Builder.mergeFrom(UnknownFieldSet.java:633)
   	at com.google.protobuf.UnknownFieldSet$Builder.mergeFrom(UnknownFieldSet.java:295)
   	at com.google.protobuf.CodedInputStream$ArrayDecoder.readGroup(CodedInputStream.java:856)
   ```
   所以第二个参数需要传递什么进去才可以做到调试呢。 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org