You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/05/20 13:50:15 UTC

[GitHub] [rocketmq-mqtt] ChangingFond opened a new issue, #101: Meet NoSuchBeanDefinitionException when subscribe topic

ChangingFond opened a new issue, #101:
URL: https://github.com/apache/rocketmq-mqtt/issues/101

   [PR 79](https://github.com/apache/rocketmq-mqtt/pull/79) defined a subscription storage interface, but there is no default implementation, then SpringUtils.getBean(SubscriptionPersistManager.class) will throw a NoSuchBeanDefinitionException, which is a runtime exception, client's subscribe/unsubscribe operations will be failed. 
   
   Solution: Catch BeansException in SpringUtils class and return null, to not block normal logic.
   
   ![image](https://user-images.githubusercontent.com/10083870/169540970-360c4c72-4773-40ed-a223-507c44763475.png)
   
   
   ```
   2022-05-20 21:40:21:072 [AuthHook_2] ERROR [AbstractUpstreamHook] 
   org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.rocketmq.mqtt.common.facade.SubscriptionPersistManager' available
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:353)
   	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)
   	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1092)
   	at org.apache.rocketmq.mqtt.common.util.SpringUtils.getBean(SpringUtils.java:35)
   	at org.apache.rocketmq.mqtt.ds.upstream.processor.SubscribeProcessor.process(SubscribeProcessor.java:65)
   	at org.apache.rocketmq.mqtt.ds.upstream.UpstreamProcessorManager.processMqttMessage(UpstreamProcessorManager.java:74)
   	at org.apache.rocketmq.mqtt.common.hook.AbstractUpstreamHook.doHook(AbstractUpstreamHook.java:44)
   	at org.apache.rocketmq.mqtt.common.hook.AbstractUpstreamHook.lambda$doHook$0(AbstractUpstreamHook.java:54)
   ```


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-mqtt] pingww closed issue #101: Meet NoSuchBeanDefinitionException when subscribe topic

Posted by GitBox <gi...@apache.org>.
pingww closed issue #101: Meet NoSuchBeanDefinitionException when subscribe topic
URL: https://github.com/apache/rocketmq-mqtt/issues/101


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org