<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.6</li>
<li>Operating System version: mac 10.14.6</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">[DUBBO] Notify urls for subscribe url provider://192.168.0.107:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&amp;application=seata-dubbo-nacos-zoo-consumer&amp;bind.ip=192.168.0.107&amp;bind.port=20881&amp;category=configurators&amp;check=false&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=seata-zoo&amp;interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&amp;methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&amp;pid=24719&amp;release=2.7.6&amp;revision=2.2.1.RELEASE&amp;side=provider&amp;timestamp=1588501610020&amp;version=1.0.0, urls: [empty://192.168.0.107:20881/com.alibaba.cloud.dubbo.service.DubboMetadataService?anyhost=true&amp;application=seata-dubbo-nacos-zoo-consumer&amp;bind.ip=192.168.0.107&amp;bind.port=20881&amp;category=providers&amp;check=false&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;group=seata-zoo&amp;interface=com.alibaba.cloud.dubbo.service.DubboMetadataService&amp;methods=getAllServiceKeys,getServiceRestMetadata,getExportedURLs,getAllExportedURLs&amp;pid=24719&amp;release=2.7.6&amp;revision=2.2.1.RELEASE&amp;side=provider&amp;timestamp=1588501610020&amp;version=1.0.0], dubbo version: 2.7.6, current host: 192.168.0.107</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？<br>
consumer可以正常消费消息</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?<br>
boot项目启动阻塞</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;Attach Listener&quot;@1,859: RUNNING
&quot;com.alibaba.nacos.client.config.security.updater&quot;@5,528 in group &quot;main&quot;: WAIT
&quot;com.alibaba.nacos.client.config.security.updater&quot;@3,698 in group &quot;main&quot;: WAIT
"><pre class="notranslate"><code class="notranslate">"Attach Listener"@1,859: RUNNING
"com.alibaba.nacos.client.config.security.updater"@5,528 in group "main": WAIT
"com.alibaba.nacos.client.config.security.updater"@3,698 in group "main": WAIT

</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.5.3</li>
<li>Operating System version: macOS 10.14.5 (18F132)</li>
<li>Java version: 1.7</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">When I use Dubbo's merger function, the service consumer configures this way<br>
&lt;dubbo:reference id="mergerGroupService" interface="com.xzd.service.GroupService" group="*" merger=".addAll" /&gt;<br>
The service provider is configured like this<br>
<br>
<br>
<br>
&lt;dubbo:service interface="com.xzd.service.GroupService" ref="userGroupService" group="user" /&gt;<br>
&lt;dubbo:service interface="com.xzd.service.GroupService" ref="adminGroupService" group="admin" /&gt;<br>
&lt;dubbo:service interface="com.xzd.service.GroupService" ref="otherGroupService" group="other" /&gt;<br>
An exception occurred when I called, I look at the exception stack (the exception stack is as follows) and find that it does not print out the real class name, but prints out 'can not merge result because missing method [addall] in class [Java. Lang.class]', but the result of my method is java.util.list,I check the source code of printing exception (mergeableclusterinvoker. Java: 140):<br>
throw new RpcException( new StringBuilder( 32 )<br>
.append( "Can not merge result because missing method [ " )<br>
.append( merger )<br>
.append( " ] in class [ " )<br>
.append( returnType.getClass().getName() )<br>
.append( " ]" )<br>
.toString() );<br>
I find it's because of this line of code<br>
returnType.getClass().getName();<br>
When I changed the code to<br>
returnType.getName();<br>
, it printed out the correct stack information<br>
Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Can not merge result because missing method [ addAll ] in class [ java.util.List ]</p>
<p dir="auto">I found that the current code also has this problem</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.<br>
<a href="https://gitee.com/figthing/dubbo-study.git" rel="nofollow">https://gitee.com/figthing/dubbo-study.git</a></p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Can not merge result because missing method [ addAll ] in class [ java.util.List ]</p>
<p dir="auto">What do you expected from the above steps？</p>
<p dir="auto">I want to modify this part of the code</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!
Exception in thread &quot;main&quot; com.alibaba.dubbo.rpc.RpcException: Can not merge result because missing method [ addAll ] in class [ java.lang.Class ]
	at com.alibaba.dubbo.rpc.cluster.support.MergeableClusterInvoker.invoke(MergeableClusterInvoker.java:140)
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
	at com.alibaba.dubbo.rpc.cluster.support.AvailableCluster$1.doInvoke(AvailableCluster.java:43)
	at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
	at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
	at com.alibaba.dubbo.common.bytecode.proxy0.getGroupName(proxy0.java)
	at com.xzd.Consumer.main(Consumer.java:30)"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Can not merge result because missing method [ addAll ] in class [ java.lang.Class ]
	at com.alibaba.dubbo.rpc.cluster.support.MergeableClusterInvoker.invoke(MergeableClusterInvoker.java:140)
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
	at com.alibaba.dubbo.rpc.cluster.support.AvailableCluster$1.doInvoke(AvailableCluster.java:43)
	at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:227)
	at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
	at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
	at com.alibaba.dubbo.common.bytecode.proxy0.getGroupName(proxy0.java)
	at com.xzd.Consumer.main(Consumer.java:30)
</code></pre></div>