Tomcat startup error. The corresponding queue cannot be found, causing memory leakage.

Source: Internet
Author: User
Tags rabbitmq

Tomcat startup error: Unable to create bean listenerStatusChangeDealHandler, no queue 'stock. policy_change.inter.cache.queue 'in vhost

From the startup log, sometimes only the memory leakage is seen, and there is no log related to the queue, it is easy to go in the wrong direction.

Follow the http://blog.csdn.net/wangjunjun2008/article/details/23375501 method to see detailed logs to determine the cause of the Error

Tomcat startup error, unable to create bean listenerStatusChangeDealHandler, no queue 'stock. NOTIFY_CHANGE.INTER.CACHE.QUEUE 'in vhostJun 5, 2014 1:39:42 org. apache. catalina. core. standardContext listenerStartSEVERE: Exception sending context initialized event to listener instance of class org. springframework. web. context. contextLoaderListenerorg. springframework. context. applicationContextException: Failed to start bean 'listenerstatuschangedealhandler'; nested exception is org. springframework. amqp. amqpIllegalStateException: Fatal exception on listener startupat org. springframework. context. support. defaultLifecycleProcessor. doStart (DefaultLifecycleProcessor. java: 169 )... caused by: org. springframework. amqp. amqpIllegalStateException: Fatal exception on listener startupat org. springframework. amqp. rabbit. listener. simpleMessageListenerContainer. doStart (SimpleMessageListenerContainer. java: 339) at org. springframework. amqp. rabbit. listener. abstractMessageListenerContainer. start (AbstractMessageListenerContainer. java: 363) at org. springframework. context. support. defaultLifecycleProcessor. doStart (DefaultLifecycleProcessor. java: 166 )... 33 moreCaused by: org. springframework. amqp. rabbit. listener. fatalListenerStartupException: Cannot prepare queue for listener. either the queue doesn't exist or the broker will not allow us to use it. at org. springframework. amqp. rabbit. listener. blockingQueueConsumer. start (BlockingQueueConsumer. java: 228) at org. springframework. amqp. rabbit. listener. simpleMessageListenerContainer $ AsyncMessageProcessingConsumer. run (SimpleMessageListenerContainer. java: 524) at java. lang. thread. run (Thread. -java: 662) Caused by: com. rabbitmq. client. shutdownSignalException: channel error; reason: {# method <channel. close> (reply-code = 404, reply-text = NOT_FOUND-no queue 'stock. policy_change.inter.cache.queue 'in vhost'/', class-id = 50, method-id = 10), null, ""} at com. rabbitmq. utility. valueOrException. getValue (ValueOrException. java: 67) at com. rabbitmq. utility. blockingValueOrException. uninterruptibleGetValue (BlockingValueOrException. java: 33) at com. rabbitmq. client. impl. AMQChannel $ BlockingRpcContinuation. getReply (AMQChannel. java: 343) at com. rabbitmq. client. impl. AMQChannel. privateRpc (AMQChannel. java: 216) at com. rabbitmq. client. impl. AMQChannel. exnWrappingRpc (AMQChannel. java: 118 )... 11 moreCaused by: com. rabbitmq. client. shutdownSignalException: channel error; reason: {# method <channel. close> (reply-code = 404, reply-text = NOT_FOUND-no queue 'stock. policy_change.inter.cache.queue 'in vhost'/', class-id = 50, method-id = 10), null, ""} at com. rabbitmq. client. impl. channelN. asyncShutdown (ChannelN. java: 454) at com. rabbitmq. client. impl. channelN. processAsync (ChannelN. java: 294) at com. rabbitmq. client. impl. AMQChannel. handleCompleteInboundCommand (AMQChannel. java: 144) at com. rabbitmq. client. impl. AMQChannel. handleFrame (AMQChannel. java: 91) at com. rabbitmq. client. impl. AMQConnection $ MainLoop. run (AMQConnection. java: 526) Jun 5, 2014 1:39:42 org. apache. catalina. core. standardContext startSEVERE: Error listenerstartjun5, 2014 1:39:42 org. apache. catalina. core. standardContext startSEVERE: Context [/TravelHubPkgStock] startup failed due to previous errorsJun 5, 2014 1:39:42 org. apache. catalina. core. applicationContext logINFO: Closing Spring root WebApplicationContextJun 5, 2014 1:39:42 org. apache. catalina. loader. webappClassLoader clearReferencesJdbcSEVERE: The web application [/TravelHubPkgStock] registered the JDBC driver [oracle. jdbc. driver. oracleDriver] but failed to unregister it when the web application was stopped. to prevent a memory leak, the JDBC Driver has been forcibly unregistered. jun 5, 2014 1:39:42 org. apache. catalina. loader. webappClassLoader clearReferencesThreadsSEVERE: The web application [/TravelHubPkgStock] appears to have started a thread named [Thread-2] but has failed to stop it. this is very likely to create a memory leak. jun 5, 2014 1:39:42 org. apache. catalina. loader. webappClassLoader clearReferencesThreadsSEVERE: The web application [/TravelHubPkgStock] appears to have started a thread named [Thread-3] but has failed to stop it. this is very likely to create a memory leak. jun 5, 2014 1:39:47 org. apache. coyote. http11.Http11Protocol startINFO: Starting Coyote HTTP/1.1 on http-8080Jun 5, 2014 1:39:48 org. apache. jk. common. channelSocket initINFO: JK: ajp13 listening on/0.0.0.0: 9090Jun 5, 2014 1:39:48 org. apache. jk. server. jkMain startINFO: Jk running ID = 0 time = 0/121 config = nullJun 5, 2014 1:39:48 org. apache. catalina. startup. catalina startINFO: Server startup in 324602 MS

After investigation and testing, it was found that the rabbitmq service was used in the project, and rabbitmq was reinstalled yesterday, so that all the queues in it were lost, resulting in an error during bean initialization at project startup.

Interestingly, when rabbitmq was stopped, the project started normally, while the rabbitmq service provided services. If a specified queue does not exist, the project could not be started normally,

It can be seen that the robustness of the code needs to be improved.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.