<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/incubator-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/incubator-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.1-SNAPSHOT</li>
<li>Operating System version: all</li>
<li>Java version: all</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">1.config a reference using generic invoke<br>
2.config method of the reference with a name that is not contained by the interface(not the GenericService, but the real service that is invoked)</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<p dir="auto">What do you expected from the above steps？</p>
<p dir="auto">report error of no such method</p>
<p dir="auto">What actually happens?</p>
<p dir="auto">no error reported</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!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<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" checked=""> 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.5</li>
<li>Operating System version: xxx</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>添加一个可以抛出java.lang.NoClassDefFoundError 的</li>
<li>配置两个协议</li>
<li>启动服务提供者,正常启动没有任何error或warn.</li>
<li>测试接口调用(接口无法访问,查日志发现该接口第二个协议没有注册信息)</li>
</ol>
<p dir="auto">问题分析:<br>
经过多次debug ,发现在调用 InMemoryWritableMetadataService.publishServiceDefinition(providerUrl) 中,执行ServiceDefinitionBuilder.build(interfaceClass) 时,抛出了 java.lang.NoClassDefFoundError,导致该接口doExport失败,且不再继续进行该接口的其它协议export.</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">异常正常抛出或打印错误日志.</p>
<p dir="auto">建议:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="catch (Throwable  t){ //catch  java.lang.NoClassDefFoundError
    logger.error(&quot;publishProvider getServiceDescriptor error. providerUrl: &quot; + providerUrl.toFullString(), t.getCause());
}           
"><pre class="notranslate"><code class="notranslate">catch (Throwable  t){ //catch  java.lang.NoClassDefFoundError
    logger.error("publishProvider getServiceDescriptor error. providerUrl: " + providerUrl.toFullString(), t.getCause());
}           

</code></pre></div>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">provider没有正常暴露完成,但没有任何提示,导致异常无法发现和定位.</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!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>