<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/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" checked=""> 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</li>
<li>Operating System version: windows7</li>
<li>Java version: 1.8</li>
<li>Dubbo Spring boot Starter: 2.7.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dubbo:
  protocol:
    port: 20880
  registry:
    address: N/A
    check: false
  consumer:
    check: false"><pre class="notranslate"><code class="notranslate">dubbo:
  protocol:
    port: 20880
  registry:
    address: N/A
    check: false
  consumer:
    check: false
</code></pre></div>
<p dir="auto">AppController:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Reference(check = false)
    private UserService userService;"><pre class="notranslate"><code class="notranslate">@Reference(check = false)
    private UserService userService;
</code></pre></div>
<h3 dir="auto">exception:</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config &lt;dubbo:registry address=&quot;...&quot; /&gt; to your spring config.
"><pre class="notranslate"><code class="notranslate">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No such any registry to reference com.epipe.ucloud.crm.service.sys.UserService on the consumer 192.168.3.177 use dubbo version 2.7.1, please config &lt;dubbo:registry address="..." /&gt; to your spring config.

</code></pre></div>
<p dir="auto"><code class="notranslate">check=false</code> doesn't take effect</p>
<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.4.1</li>
<li>Operating System version: macos, linux</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">背景</h3>
<p dir="auto">这个issue不是正常的使用场景下产生的啊... 我在做一个 dubbo 的<a href="https://github.com/asura-pro/pea">压测工具</a> ,  要在 JVM 不退出的情况下 重载 dubbo 的接口class.  如: <a href="https://github.com/asura-pro/pea-simulations/blob/master/ext-library/src/main/java/pea/example/ext/dubbo/api/GreetingService.java">GreetingService</a></p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public interface GreetingService {
  String sayHello(String name);
  HelloResponse sayHello2(String name);
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">interface</span> <span class="pl-smi">GreetingService</span> {
  <span class="pl-smi">String</span> <span class="pl-en">sayHello</span>(<span class="pl-smi">String</span> <span class="pl-s1">name</span>);
  <span class="pl-smi">HelloResponse</span> <span class="pl-en">sayHello2</span>(<span class="pl-smi">String</span> <span class="pl-s1">name</span>);
}</pre></div>
<h3 dir="auto">现象</h3>
<p dir="auto">第一次调用时 <code class="notranslate">HelloResponse</code> 返回正常，类加载器是: <a href="https://github.com/asura-pro/pea/blob/master/app/pea/app/compiler/ReloadableClassLoader.scala">pea.app.compiler.ReloadableClassLoader</a><br>
(这个是我自定义的类加载器, 每次调用都会是新的)。</p>
<p dir="auto">之后的调用就会报异常:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[error] p.d.a.DubboAction - failure: ==========&gt; java.lang.ClassCastException: pea.example.ext.dubbo.response.HelloResponse cannot be cast to pea.example.ext.dubbo.response.HelloResponse
	at org.apache.dubbo.common.bytecode.proxy1.sayHello2(proxy1.java)
	at pea.example.dubbo.GreetingSimulation.$anonfun$scn$1(GreetingSimulation.scala:23)
	at pea.dubbo.action.DubboAction.$anonfun$execute$1(DubboAction.scala:43)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)"><pre class="notranslate"><code class="notranslate">[error] p.d.a.DubboAction - failure: ==========&gt; java.lang.ClassCastException: pea.example.ext.dubbo.response.HelloResponse cannot be cast to pea.example.ext.dubbo.response.HelloResponse
	at org.apache.dubbo.common.bytecode.proxy1.sayHello2(proxy1.java)
	at pea.example.dubbo.GreetingSimulation.$anonfun$scn$1(GreetingSimulation.scala:23)
	at pea.dubbo.action.DubboAction.$anonfun$execute$1(DubboAction.scala:43)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
	at scala.util.Success.$anonfun$map$1(Try.scala:255)
	at scala.util.Success.map(Try.scala:213)
</code></pre></div>
<h3 dir="auto">问题</h3>
<p dir="auto">这个问题大概是怎么产生的啊？为啥第一调用没事, 代理类返回的 <code class="notranslate">HelloResponse</code>是不是有缓存啊之类的？如果有怎么清掉？</p>