zcbbpo opened a new issue #9765:
URL: https://github.com/apache/dubbo/issues/9765


   Hi, The telnet dubbo will throw class cast exception
   
   ### Environment
   
   * Dubbo version: 2.7.13
   * Operating System version: mac os 12.2
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. enable qos
   2. open cmd and type telnet ip port
   3. type ls
   The console display class cast exception
   
![image](https://user-images.githubusercontent.com/54526829/157654979-f115431d-fbb8-42f3-97a8-5d51e32a793c.png)
   
   
   
   I have debug and see the source _code:
   org.apache.dubbo.qos.command.util.ServiceCheckUtils#isRegistered
   and find 
   
![image](https://user-images.githubusercontent.com/54526829/157654435-3191a805-6e05-4c0a-bdcb-d0208aed8432.png)
   org.apache.dubbo.registry.client.ServiceDiscoveryRegistry was not extend 
org.apache.dubbo.registry.support.AbstractRegistry
   So 
   `AbstractRegistry abstractRegistry = (AbstractRegistry) 
registries.iterator().next()`
   this code will throws class cast exception
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to