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

RemotingException: Fail to decode request due to: RpcInvocation [methodName=test2, parameterTypes=[class java.util.UUID], arguments=null #6262

Closed
Queeee opened this issue Jun 2, 2020 · 2 comments
Assignees
Milestone

Comments

@Queeee
Copy link

Queeee commented Jun 2, 2020

[ √ ] I have searched the issues of this repository and believe that this is not a duplicate.
[ √ ] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.4.1
  • Operating System version: mac os
  • Java version: jkd1.8

Steps to reproduce this issue

使用hessian序列化UUID时出现异常,具体异常日志如下,原因在于arguments=null,怀疑是
hessian2反序列化

  protected static Object getParamArg(Class cl) {
        if (!cl.isPrimitive())
            return null;

这段代码导致入参为空,实际为byte[]

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=test2, parameterTypes=[class java.util.UUID], arguments=null, attachments={path=vip.maxhub.web.relationship.api.service.RelationshipService, input=360, dubbo=2.0.2, version=1.0.0}]
	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[?:1.8.0_111]
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915) ~[?:1.8.0_111]
	at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:56) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:92) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:60) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$CallbackRegistrationInvoker.invoke(ProtocolFilterWrapper.java:157) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	... 125 more
Caused by: org.apache.dubbo.remoting.RemotingException: Fail to decode request due to: RpcInvocation [methodName=test2, parameterTypes=[class java.util.UUID], arguments=null, attachments={path=vip.maxhub.web.relationship.api.service.RelationshipService, input=360, dubbo=2.0.2, version=1.0.0}]
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:191) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:153) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:141) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleResponse(HeaderExchangeHandler.java:62) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:199) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_111]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_111]
	... 1 more```
@mercyblitz mercyblitz added this to the 2.7.8 milestone Jun 3, 2020
@Queeee
Copy link
Author

Queeee commented Jun 4, 2020

通过修改hessian-lite中对uuid的序列化定制,修复了此bug

@chickenlj
Copy link
Contributor

Fixed with apache/dubbo-hessian-lite#33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants