tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEUE' in vhost

从启动日志来看,有时候仅会看到内存泄漏。而没有与queue相关的日志,非常easy走错方向。

依照 http://blog.csdn.net/wangjunjun2008/article/details/23375501 的方法能够看到具体日志。从而确定报错原因

tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEUE' in vhost
Jun 5, 2014 1:39:42 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.context.ApplicationContextException: Failed to start bean 'listenerStatusChangeDealHandler';
nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:169)
...
Caused by: org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
at 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 more
Caused 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.NOTIFY_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 more
Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; reason: {#method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'STOCK.NOTIFY_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 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jun 5, 2014 1:39:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/TravelHubPkgStock] startup failed due to previous errors
Jun 5, 2014 1:39:42 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
Jun 5, 2014 1:39:42 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: 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 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: 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 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: 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 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jun 5, 2014 1:39:48 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:9090
Jun 5, 2014 1:39:48 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/121 config=null
Jun 5, 2014 1:39:48 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 324602 ms

经过排查和測试,发现项目中使用rabbitmq服务,而rabbitmq于昨天被重装了,从而里面的队列所有没有了,导致项目启动时初始化bean时候报错。

有趣的是,之前rabbitmq停止服务时。该项目启动正常。而rabbitmq服务提供服务,且某一指定队列不存在时。项目却无法正常启动,

由此可见。代码的健壮性有待改进哪。

tomcat启动报错,找不到相应的 queue,从而引发内存泄漏的更多相关文章

  1. 转!java web项目 build path 导入jar包,tomcat启动报错 找不到该类

    在eclipse集成tomcat开发java web项目时,引入的外部jar包,编译通过,但启动tomcat运行web时提示找不到jar包内的类,需要作如下配置,将jar包在部署到集成的tomcat环 ...

  2. tomcat启动报错

    [toc]启动错误 does not exist or is not a readable directory 问题:tomcat启动报错:does not exist or is not a rea ...

  3. Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

    Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested addres ...

  4. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  5. tomcat启动报错Several ports (8080, 8009) required by Tomcat v6.0

    tomcat启动报错 如下图: 问题:8080.8009端口已经被占用. 解决办法: 1.在命令提示符下,输入netstat -aon | findstr 8080 2.继续输入taskkill -F ...

  6. [转]tomcat启动报错too low setting for -Xss

    tomcat启动报错too low setting for -Xss 网上给的答案都是调整Xss参数,其实不是正确的做法, -Xss:每个线程的Stack大小,“-Xss 15120” 这使得tomc ...

  7. tomcat启动报错 ERROR o.a.catalina.session.StandardManager 182 - Exception loading sessions from persiste

    系统:centos6.5 x86_64 jdk: 1.8.0_102 tomcat:8.0.37 tomcat 启动报错: ERROR o.a.catalina.session.StandardMan ...

  8. Tomcat启动报错:[The configuration may be corrupt or incomplete]的解决方案

    1,场景说明: 偶然碰见Tomcat启动报错,此时并没有Add任何Web项目: Could not load the Tomcat server configuration at /Servers/T ...

  9. tomcat启动报错:Injection of autowired dependencies failed

    tomcat启动报错:Injectjion of autowired dependencies failed 环境: 操作系统:centos6.5 tomcat: 7.0.52 jdk:openjdk ...

随机推荐

  1. Hibernate 使用MyEclipse简化开发

    在平时开发中写配置文件比较繁琐,在这里写一下如何使用myEclipse简化开发. 1.打开MyEclipse,创建数据库连接 单机测试连接按钮,如果出现成功建立连接,则连接成功. 然后Finish 2 ...

  2. POJ 1498[二分匹配——最小顶点覆盖]

    题目链接:[http://acm.hdu.edu.cn/showproblem.php?pid=1498] 题意:给出一个大小为n*n(0<n<100)的矩阵,矩阵中放入m种颜色(标号为1 ...

  3. Linux下C语言多文件的编译以及makefile的应用

    1.关于编译和链接 一般来说,无论是C.C++,首先要把源文件编译成中间代码文件,在Windows下也就是.obj文件,UNIX下是.o文件,即Object File,这个动作叫做编译(compile ...

  4. [NOI2015]寿司晚宴 --- 状压DP

    [NOI2015]寿司晚宴 题目描述 为了庆祝NOI的成功开幕,主办方为大家准备了一场寿司晚宴. 小G和小W作为参加NOI的选手,也被邀请参加了寿司晚宴. 在晚宴上,主办方为大家提供了n−1种不同的寿 ...

  5. Linux 自动化部署

    1.pexpect Pexpect 是 Don Libes 的 Expect 语言的一个 Python 实现,是一个用来启动子程序,并使用正则表达式对程序输出做出特定响应,以此实现与其自动交互的 Py ...

  6. Java 请求webServce接口 带参数

    public String getWebServiceByParams(String param){ //获取基金缴付记录 // Post请求的url,与get不同的是不需要带参数 URL postU ...

  7. 二、python的逻辑运算与数据类型

    .python的逻辑运算符 数学运算符 加:+   减:-  乘:*  除:/  取余:% 关系运算符 等于: ==  不等于: != 小于:< 大于:>     大于等于: >=  ...

  8. sqlserver -- 学习笔记(二)“SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问”解决方法

    将数据表导出到excel时出现下面错误: SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而 ...

  9. PAT甲级1089. Insert or Merge

    PAT甲级1089. Insert or Merge 题意: 根据维基百科: 插入排序迭代,消耗一个输入元素每次重复,并增加排序的输出列表.每次迭代,插入排序从输入数据中删除一个元素,在排序列表中找到 ...

  10. 配置nginx虚拟目录配置文件支持tp的pathinfo

    lnmp自带的包不好用, 经测试,在相应的conf文件加入这句话即可: location / { if (!-e $request_filename) { rewrite ^(.*)$ /index. ...