chaoyoung commented on issue #12855:
URL: https://github.com/apache/dubbo/issues/12855#issuecomment-1677059093
```proto
syntax = "proto3";
option java_multiple_files = true;
option java_package = "org.example.dubbo.rpc";
option java_outer_classname = "VoiceChatProto";
package org.example.dubbo.chat;
service VoiceChat {
rpc chat(stream VoiceChatRequest) returns (stream VoiceChatResponse);
}
message VoiceChatRequest {
string callId = 1;
bytes data = 3;
}
message VoiceChatResponse {
string callId = 1;
bytes data = 2;
}
```
> ps: 这里java_package和package的值不一样
`option java_package = "org.example.dubbo.rpc";`
`package org.example.dubbo.chat;`
客户端使用java_package的path导致了server端NPE
```java
ReferenceConfig<VoiceChat> ref = new ReferenceConfig<>();
ref.setInterface(VoiceChat.class);
ref.setProtocol("tri");
ref.setVersion("1.0");
ref.setUrl("tri://localhost:50051/org.example.dubbo.rpc.VoiceChat");
```
复现步骤:
- `git clone https://github.com/chaoyoung/dubbo-demo.git`
- `mvn clean compile`
- run `org.example.dubbo.VoiceChatProvider#main`
- run `org.example.dubbo.VoiceChatConsumer#main`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]