apache / dubbo-go-samples

Apache dubbo
https://dubbo.apache.org/
Apache License 2.0
228 stars 182 forks source link

master分支下的helloworld示例正常,但是java_interop/protobuf-triple/java/java-client无法运行 #752

Open fengnex opened 2 months ago

fengnex commented 2 months ago

验证master分支下的java_interop项目时不断遇到问题:

  1. 执行java_interop/protobuf-triple/java/java-client的run.sh报错,请教该怎么解决? maven输出的具体错误如下,看起来可能是因为缺少jar: `[ERROR] PROTOC FAILED: Error: Could not find or load main class org.apache.dubbo.gen.tri.Dubbo3TripleGenerator Caused by: java.lang.ClassNotFoundException: org.apache.dubbo.gen.tri.Dubbo3TripleGenerator --dubbo_out: protoc-gen-dubbo: Plugin failed with status code 1.

[ERROR] /.../dubbo-go-samples-main/java_interop/protobuf-triple/java/java-client/src/main/proto/greet.proto [0:0]: Error: Could not find or load main class org.apache.dubbo.gen.tri.Dubbo3TripleGenerator Caused by: java.lang.ClassNotFoundException: org.apache.dubbo.gen.tri.Dubbo3TripleGenerator --dubbo_out: protoc-gen-dubbo: Plugin failed with status code 1`

fengnex commented 2 months ago
  1. 另外,这个实例,也就是dubbo-go-samples-main/helloworld/go-server/cmd这个go server端能正常启动,但是根据其README.md中提示的下面的命令验证该server是否正常时,报404 page not found,说明下面这个命令也有问题,同问该怎么解决? 具体命令如下: curl --header "Content-Type: application/json" --data '{"name": "Dubbo"}' http://localhost:50052/org.apache.dubbo.sample.Greeter/sayHello
fengnex commented 2 months ago

java_interop/protobuf-triple/java下面的java-server和java-client都不能通过各自自带的run.sh成功编译,都报下面的错误: [ERROR] PROTOC FAILED: Error: Could not find or load main class org.apache.dubbo.gen.tri.Dubbo3TripleGenerator Caused by: java.lang.ClassNotFoundException: org.apache.dubbo.gen.tri.Dubbo3TripleGenerator --dubbo_out: protoc-gen-dubbo: Plugin failed with status code 1.

fengnex commented 2 months ago

解决上面的问题后又遇到下面的问题,怎么解决? Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project java-client: An exception occurred while executing the Java class. UNIMPLEMENTED : invalid content-type: text/plain; charset=utf-8 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.0:java (default-cli) on project java-client: An exception occurred while executing the Java class. UNIMPLEMENTED : invalid content-type: text/plain; charset=utf-8

fengnex commented 2 months ago

这个示例的Java-server和java-client之间不能互通,存在的问题: [DUBBO] can not found commandContext, url: /org.apache.dubbo.sample.Greeter/sayHello, dubbo version: 3.1.7, current host: 172.21.0.1, error code: 7-6. This may be caused by , go to https://dubbo.apache.org/faq/7/6 to find instructions. 还有: An exception occurred while executing the Java class. Failed to check the status of the service org.apache.dubbo.sample.Greeter. No provider available for the service org.apache.dubbo.sample.Greeter from the url consumer://localhost?application=dubbo-test&background=false&interface=org.apache.dubbo.sample.Greeter&pid=115129&register.ip=172.21.0.1&side=consumer&sticky=false&timeout=3000&unloadClusterRelated=false to the consumer 172.21.0.1 use dubbo version 3.1.7

fengnex commented 2 months ago

closed