Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got exception with triple protocol when package and java_package are different in .proto #13496

Closed
chickenlj opened this issue Dec 13, 2023 · 1 comment
Labels
type/bug Bugs to being fixed
Milestone

Comments

@chickenlj
Copy link
Contributor

chickenlj commented Dec 13, 2023

Dubbo version: 3.3.0-beta.1, 3.2.9
Protocol: triple with protobuf
JDK: 17

When package and java_package are different in .proto

syntax = "proto3";

option java_multiple_files = true;
option java_package = "org.apache.dubbo.springboot.demo.idl";

package greet;

message GreeterRequest {
  string name = 1;
}

message GreeterReply {
  string message = 1;
}

service Greeter{

  rpc greet(GreeterRequest) returns (GreeterReply);

}

Got the following

java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Method.getGenericReturnType()" because the return value of "org.apache.dubbo.rpc.model.MethodDescriptor.getMethod()" is null
	at org.apache.dubbo.rpc.protocol.tri.ReflectionPackableMethod.needWrap(ReflectionPackableMethod.java:247) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.http2.GenericHttp2ServerTransportListener.startListener(GenericHttp2ServerTransportListener.java:93) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.http2.GenericHttp2ServerTransportListener.initializeServerCallListener(GenericHttp2ServerTransportListener.java:202) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.http2.GenericHttp2ServerTransportListener.newHttpMessageListener(GenericHttp2ServerTransportListener.java:150) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.grpc.GrpcHttp2ServerTransportListener.access$1001(GrpcHttp2ServerTransportListener.java:54) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.grpc.GrpcHttp2ServerTransportListener$DetermineMethodDescriptorListener.onFragmentMessage(GrpcHttp2ServerTransportListener.java:202) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.remoting.http12.message.LengthFieldStreamingDecoder.invokeListener(LengthFieldStreamingDecoder.java:171) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.remoting.http12.message.LengthFieldStreamingDecoder.processBody(LengthFieldStreamingDecoder.java:163) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.remoting.http12.message.LengthFieldStreamingDecoder.deliver(LengthFieldStreamingDecoder.java:108) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.remoting.http12.message.LengthFieldStreamingDecoder.decode(LengthFieldStreamingDecoder.java:72) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.grpc.GrpcHttp2ServerTransportListener$LazyFindMethodListener.onMessage(GrpcHttp2ServerTransportListener.java:149) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.doOnData(AbstractServerTransportListener.java:190) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.lambda$onData$1(AbstractServerTransportListener.java:178) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:102) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) ~[dubbo-3.3.0-beta.1.jar:3.3.0-beta.1]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
@chickenlj chickenlj added type/bug Bugs to being fixed type/discussion Everything related with code discussion or question and removed type/bug Bugs to being fixed labels Dec 13, 2023
@chickenlj
Copy link
Contributor Author

@chickenlj chickenlj added type/bug Bugs to being fixed and removed type/discussion Everything related with code discussion or question labels Dec 14, 2023
@CrazyHZM CrazyHZM added this to the 3.2.11 milestone Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

2 participants