<ul dir="auto">
<li>[*] 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>[*] 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-SNAPSHOT</li>
<li>Dubbo branch: master</li>
<li>Operating System version: macOS  Catalina</li>
<li>Java version: jdk-11.0.5.jdk</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>start zookeeper localhost</li>
<li>write  code consumer-side, like this</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="   public class ConsumerApplication {

	private static String zookeeperHost = System.getProperty(&quot;zookeeper.address&quot;, &quot;127.0.0.1&quot;);

	public static void main(String[] args) {
		ReferenceConfig&lt;DemoService&gt; reference = new ReferenceConfig&lt;&gt;();
		reference.setApplication(new ApplicationConfig(&quot;first-dubbo-consumer&quot;));
		reference.setRegistry(new RegistryConfig(&quot;zookeeper://&quot; + zookeeperHost + &quot;:2181&quot;));
		reference.setInterface(DemoService.class);

		DemoService service = reference.get();
		String message = service.sayHello(&quot;dubbo&quot;);

		System.out.println(message);
	}
}
"><pre class="notranslate">   <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">ConsumerApplication</span> {

	<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-smi">String</span> <span class="pl-s1">zookeeperHost</span> = <span class="pl-smi">System</span>.<span class="pl-en">getProperty</span>(<span class="pl-s">"zookeeper.address"</span>, <span class="pl-s">"127.0.0.1"</span>);

	<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) {
		<span class="pl-smi">ReferenceConfig</span>&lt;<span class="pl-smi">DemoService</span>&gt; <span class="pl-s1">reference</span> = <span class="pl-k">new</span> <span class="pl-smi">ReferenceConfig</span>&lt;&gt;();
		<span class="pl-s1">reference</span>.<span class="pl-en">setApplication</span>(<span class="pl-k">new</span> <span class="pl-smi">ApplicationConfig</span>(<span class="pl-s">"first-dubbo-consumer"</span>));
		<span class="pl-s1">reference</span>.<span class="pl-en">setRegistry</span>(<span class="pl-k">new</span> <span class="pl-smi">RegistryConfig</span>(<span class="pl-s">"zookeeper://"</span> + <span class="pl-s1">zookeeperHost</span> + <span class="pl-s">":2181"</span>));
		<span class="pl-s1">reference</span>.<span class="pl-en">setInterface</span>(<span class="pl-smi">DemoService</span>.<span class="pl-k">class</span>);

		<span class="pl-smi">DemoService</span> <span class="pl-s1">service</span> = <span class="pl-s1">reference</span>.<span class="pl-en">get</span>();
		<span class="pl-smi">String</span> <span class="pl-s1">message</span> = <span class="pl-s1">service</span>.<span class="pl-en">sayHello</span>(<span class="pl-s">"dubbo"</span>);

		<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s1">message</span>);
	}
}</pre></div>
<ol start="3" dir="auto">
<li>write code provider-side like this</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class Application {

	private static String zookeeperHost = System.getProperty(&quot;zookeeper.address&quot;, &quot;127.0.0.1&quot;);

	public static void main(String[] args) throws Exception {
		ServiceConfig&lt;DemoService&gt; service = new ServiceConfig&lt;DemoService&gt;();
		service.setApplication(new ApplicationConfig(&quot;first-dubbo-provider&quot;));
		service.setRegistry(new RegistryConfig(&quot;zookeeper://&quot; + zookeeperHost + &quot;:2181&quot;));
		service.setInterface(DemoService.class);
		service.setRef(new DemoServiceImpl());
		service.setParameters(new HashMap&lt;&gt;());
		service.export();

		System.out.println(&quot;dubbo service started&quot;);
		new CountDownLatch(1).await();
	}
}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">Application</span> {

	<span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-smi">String</span> <span class="pl-s1">zookeeperHost</span> = <span class="pl-smi">System</span>.<span class="pl-en">getProperty</span>(<span class="pl-s">"zookeeper.address"</span>, <span class="pl-s">"127.0.0.1"</span>);

	<span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">main</span>(<span class="pl-smi">String</span>[] <span class="pl-s1">args</span>) <span class="pl-k">throws</span> <span class="pl-smi">Exception</span> {
		<span class="pl-smi">ServiceConfig</span>&lt;<span class="pl-smi">DemoService</span>&gt; <span class="pl-s1">service</span> = <span class="pl-k">new</span> <span class="pl-smi">ServiceConfig</span>&lt;<span class="pl-smi">DemoService</span>&gt;();
		<span class="pl-s1">service</span>.<span class="pl-en">setApplication</span>(<span class="pl-k">new</span> <span class="pl-smi">ApplicationConfig</span>(<span class="pl-s">"first-dubbo-provider"</span>));
		<span class="pl-s1">service</span>.<span class="pl-en">setRegistry</span>(<span class="pl-k">new</span> <span class="pl-smi">RegistryConfig</span>(<span class="pl-s">"zookeeper://"</span> + <span class="pl-s1">zookeeperHost</span> + <span class="pl-s">":2181"</span>));
		<span class="pl-s1">service</span>.<span class="pl-en">setInterface</span>(<span class="pl-smi">DemoService</span>.<span class="pl-k">class</span>);
		<span class="pl-s1">service</span>.<span class="pl-en">setRef</span>(<span class="pl-k">new</span> <span class="pl-smi">DemoServiceImpl</span>());
		<span class="pl-s1">service</span>.<span class="pl-en">setParameters</span>(<span class="pl-k">new</span> <span class="pl-smi">HashMap</span>&lt;&gt;());
		<span class="pl-s1">service</span>.<span class="pl-en">export</span>();

		<span class="pl-smi">System</span>.<span class="pl-s1">out</span>.<span class="pl-en">println</span>(<span class="pl-s">"dubbo service started"</span>);
		<span class="pl-k">new</span> <span class="pl-smi">CountDownLatch</span>(<span class="pl-c1">1</span>).<span class="pl-en">await</span>();
	}
}</pre></div>
<ol start="4" dir="auto">
<li>serviceImpl code like this</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Service(version = &quot;1.0.0&quot;,timeout = 9000)
public class DemoServiceImpl implements DemoService {

    @Override
    public String sayHello(String name) {
	    try{
	        Thread.sleep(7000);
        }catch (Exception ex){

        }
        return &quot;Hello, &quot; + name + &quot;, &quot; + new Date();
    }
}"><pre class="notranslate"><code class="notranslate">@Service(version = "1.0.0",timeout = 9000)
public class DemoServiceImpl implements DemoService {

    @Override
    public String sayHello(String name) {
	    try{
	        Thread.sleep(7000);
        }catch (Exception ex){

        }
        return "Hello, " + name + ", " + new Date();
    }
}
</code></pre></div>
<p dir="auto">You can find that the TIMEOUT is 9000,  but I got an Exception  and  it tells me the TIMEOUT is 1000.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.example.studydubboApi.DemoService. Tried 3 times of the providers [192.168.1.5:20880] (1/1) from the registry 127.0.0.1:2181 on the consumer 192.168.1.5 using the dubbo version 2.7.5-SNAPSHOT. Last error is: Invoke remote method timeout. method: sayHello, provider: dubbo://192.168.1.5:20880/com.example.studydubboApi.DemoService?anyhost=true&amp;application=first-dubbo-consumer&amp;check=false&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;interface=com.example.studydubboApi.DemoService&amp;lazy=false&amp;methods=sayHello&amp;pid=20243&amp;register.ip=192.168.1.5&amp;release=2.7.5-SNAPSHOT&amp;remote.application=first-dubbo-provider&amp;side=consumer&amp;sticky=false&amp;timestamp=1571837759756, cause: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:113)
	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:248)
	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:78)
	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:55)
	at org.apache.dubbo.common.bytecode.proxy0.sayHello(proxy0.java)
	at com.example.studydubboconsumer.ConsumerApplication.main(ConsumerApplication.java:20)
Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:56)
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:92)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:60)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$CallbackRegistrationInvoker.invoke(ProtocolFilterWrapper.java:157)
	at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
	... 5 more
Caused by: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:189)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:153)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture$TimeoutCheckTask.run(DefaultFuture.java:258)
	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
	at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
	at java.base/java.lang.Thread.run(Thread.java:834)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service com.example.studydubboApi.DemoService. Tried 3 times of the providers [192.168.1.5:20880] (1/1) from the registry 127.0.0.1:2181 on the consumer 192.168.1.5 using the dubbo version 2.7.5-SNAPSHOT. Last error is: Invoke remote method timeout. method: sayHello, provider: dubbo://192.168.1.5:20880/com.example.studydubboApi.DemoService?anyhost=true&amp;application=first-dubbo-consumer&amp;check=false&amp;deprecated=false&amp;dubbo=2.0.2&amp;dynamic=true&amp;generic=false&amp;interface=com.example.studydubboApi.DemoService&amp;lazy=false&amp;methods=sayHello&amp;pid=20243&amp;register.ip=192.168.1.5&amp;release=2.7.5-SNAPSHOT&amp;remote.application=first-dubbo-provider&amp;side=consumer&amp;sticky=false&amp;timestamp=1571837759756, cause: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:113)
	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:248)
	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:78)
	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:55)
	at org.apache.dubbo.common.bytecode.proxy0.sayHello(proxy0.java)
	at com.example.studydubboconsumer.ConsumerApplication.main(ConsumerApplication.java:20)
Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2022)
	at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(AsyncToSyncInvoker.java:56)
	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:78)
	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:92)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:60)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:82)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper$CallbackRegistrationInvoker.invoke(ProtocolFilterWrapper.java:157)
	at org.apache.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:56)
	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
	... 5 more
Caused by: org.apache.dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan timer. start time: 2019-10-23 21:39:46.800, end time: 2019-10-23 21:39:47.825, client elapsed: 5 ms, server elapsed: 1018 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=sayHello, parameterTypes=[class java.lang.String], arguments=[dubbo], attachments={path=com.example.studydubboApi.DemoService, remote.application=first-dubbo-consumer, interface=com.example.studydubboApi.DemoService, version=0.0.0}]], channel: /192.168.1.5:56619 -&gt; /192.168.1.5:20880
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.doReceived(DefaultFuture.java:189)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.java:153)
	at org.apache.dubbo.remoting.exchange.support.DefaultFuture$TimeoutCheckTask.run(DefaultFuture.java:258)
	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:648)
	at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:727)
	at org.apache.dubbo.common.timer.HashedWheelTimer$Worker.run(HashedWheelTimer.java:449)
	at java.base/java.lang.Thread.run(Thread.java:834)
</code></pre></div>
<p dir="auto">Is it an issue?</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: master</li>
<li>Operating System version: mac os 10.14.3</li>
<li>Java version: 1.8.0_201</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>use   StringUtils.isNotEmpty(id)  instead of   id != null &amp;&amp; id.length() in DubboBeanDefinitionParser.JAVA at line 97</li>
</ol>
<p dir="auto">What do you expected from the above steps？<br>
make code clear and unity as other StringUtils method used in this class</p>