dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kexianjun (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] kexianjun opened issue #3779: problem with generic parameter when using fastjson serialization
Date Mon, 01 Apr 2019 05:27:33 GMT
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this
repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md)
of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.2
* Operating System version: windows 10
* Java version: 1.8

### Steps to reproduce this issue
1. using generic types(say List<PersonTest<String>> or Map<String, List<PersonTest<String>>>)
as method parameters
2. call this RPC method
the similar problem with generic return type has been fixd in #3771 

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

the provider side with receive the correct parameter type

### Actual Result

the actual result is as the following 
![image](https://user-images.githubusercontent.com/12162539/55305082-4cf2b680-5481-11e9-8893-3c21a14701a6.png)
and when I trying to do some with it, it will throw exception

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

```
java.lang.ClassCastException: com.alibaba.fastjson.JSONObject cannot be cast to org.apache.dubbo.demo.PersonTest
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.apache.dubbo.demo.provider.DemoServiceImpl.fastjsonTest1(DemoServiceImpl.java:67)
	at org.apache.dubbo.common.bytecode.Wrapper1.invokeMethod(Wrapper1.java)
	at org.apache.dubbo.rpc.proxy.javassist.JavassistProxyFactory$1.doInvoke(JavassistProxyFactory.java:47)
	at org.apache.dubbo.rpc.proxy.AbstractProxyInvoker.invoke(AbstractProxyInvoker.java:86)
	at org.apache.dubbo.config.invoker.DelegateProviderMetaDataInvoker.invoke(DelegateProviderMetaDataInvoker.java:56)
	at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
	at org.apache.dubbo.rpc.filter.ExceptionFilter.invoke(ExceptionFilter.java:63)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:88)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.TimeoutFilter.invoke(TimeoutFilter.java:54)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.protocol.dubbo.filter.TraceFilter.invoke(TraceFilter.java:80)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.ContextFilter.invoke(ContextFilter.java:79)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.GenericFilter.invoke(GenericFilter.java:137)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.ClassLoaderFilter.invoke(ClassLoaderFilter.java:38)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.filter.EchoFilter.invoke(EchoFilter.java:39)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:73)
	at org.apache.dubbo.rpc.protocol.dubbo.DubboProtocol$1.reply(DubboProtocol.java:128)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.handleRequest(HeaderExchangeHandler.java:103)
	at org.apache.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:200)
	at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:51)
	at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
```


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3779 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


Mime
View raw message