<p dir="auto">I mistakenly exported <code class="notranslate">ServiceConfig</code> twice, the second call produces the following exception which makes no sense:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
	at org.apache.dubbo.config.AbstractConfig.refresh(AbstractConfig.java:568) [dubbo-2.7.0.jar:2.7.0]
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:272) [dubbo-2.7.0.jar:2.7.0]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:328) [dubbo-2.7.0.jar:2.7.0]
	at xx.xx.xx.xx.rpc.NodeRpcServerV3.start(NodeRpcServerV3.java:298) [classes/:?]
	at xx.xx.xx.xx.rpc.NodeRpcV3Test.init(NodeRpcV3Test.java:21) [test-classes/:?]
	....
Caused by: java.lang.IllegalArgumentException: Unsupported generic type false
	at org.apache.dubbo.config.ServiceConfig.setGeneric(ServiceConfig.java:959) ~[dubbo-2.7.0.jar:2.7.0]
	... 67 more"><pre class="notranslate"><code class="notranslate">java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_91]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_91]
	at org.apache.dubbo.config.AbstractConfig.refresh(AbstractConfig.java:568) [dubbo-2.7.0.jar:2.7.0]
	at org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:272) [dubbo-2.7.0.jar:2.7.0]
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:328) [dubbo-2.7.0.jar:2.7.0]
	at xx.xx.xx.xx.rpc.NodeRpcServerV3.start(NodeRpcServerV3.java:298) [classes/:?]
	at xx.xx.xx.xx.rpc.NodeRpcV3Test.init(NodeRpcV3Test.java:21) [test-classes/:?]
	....
Caused by: java.lang.IllegalArgumentException: Unsupported generic type false
	at org.apache.dubbo.config.ServiceConfig.setGeneric(ServiceConfig.java:959) ~[dubbo-2.7.0.jar:2.7.0]
	... 67 more
</code></pre></div>
<p dir="auto">It took me at least one hour to locate the root cause.</p>
<p dir="auto">Dubbo version: 2.7.0</p>
<p dir="auto">I've crafted a demo for this issue at this <a href="https://github.com/JerryChin/dubbo-issue-3629">repo</a>.</p>
<p dir="auto">I wonder why consumer url not register and unregister to consul:</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/apache/dubbo/blob/afbf7d5171736dafba56bad7dcb664f1f2ce480e/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java#L102-L104">dubbo/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 102 to 104
      in
      <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/afbf7d5171736dafba56bad7dcb664f1f2ce480e">afbf7d5</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L102" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="102"></td>
          <td id="LC102" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-en">isConsumerSide</span>(<span class="pl-s1">url</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L103" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="103"></td>
          <td id="LC103" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">return</span>; </td>
        </tr>

        <tr class="border-0">
          <td id="L104" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="104"></td>
          <td id="LC104" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/apache/dubbo/blob/afbf7d5171736dafba56bad7dcb664f1f2ce480e/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java#L120-L122">dubbo/dubbo-registry/dubbo-registry-consul/src/main/java/org/apache/dubbo/registry/consul/ConsulRegistry.java</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 120 to 122
      in
      <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/afbf7d5171736dafba56bad7dcb664f1f2ce480e">afbf7d5</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L120" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="120"></td>
          <td id="LC120" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> (<span class="pl-en">isConsumerSide</span>(<span class="pl-s1">url</span>)) { </td>
        </tr>

        <tr class="border-0">
          <td id="L121" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="121"></td>
          <td id="LC121" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     <span class="pl-k">return</span>; </td>
        </tr>

        <tr class="border-0">
          <td id="L122" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="122"></td>
          <td id="LC122" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> } </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">And this issue is duplicated to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="617210804" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/6147" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/6147/hovercard" href="https://github.com/apache/dubbo/issues/6147">#6147</a>.</p>