我使用的是春季靴子1.5.8。我已经配置了2个jms监听器。当我试图使用kill sigterm优雅地关闭时,我得到了这个例外。
13-06-2018 13:21:16 :: WARN :: defaultValueForJmsMessageId::[Thread-2] :: Failed to shut down 1 bean with phase value 2147483647 within timeout of 30000: [org.springframework.jms.config.internalJmsListenerEndpointRegistry]
13-06-2018 13:21:19 :: ERROR :: defaultValueForJmsMessageId::[AMQP Connection 10.23.219.62:5672] :: An unexpected connection driver error occured
java.lang.NoClassDefFoundError: com/rabbitmq/utility/Utility
at com.rabbitmq.client.impl.ChannelN.broadcastShutdownSignal(ChannelN.java:273)
at com.rabbitmq.client.impl.ChannelN.finishProcessShutdownSignal(ChannelN.java:291)
at com.rabbitmq.client.impl.ChannelN.access$000(ChannelN.java:50)
at com.rabbitmq.client.impl.ChannelN$1.transformReply(ChannelN.java:588)
at com.rabbitmq.client.impl.ChannelN$1.transformReply(ChannelN.java:585)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.handleCommand(AMQChannel.java:356)
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:149)
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:90)
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:634)
at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:572)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.rabbitmq.utility.Utility
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 12 common frames omitted
13-06-2018 13:21:29 :: WARN :: defaultValueForJmsMessageId::[Thread-2] :: Invocation of destroy method failed on bean with name 'rabbitConnectionFactory': java.lang.NoClassDefFoundError: com/rabbitmq/client/impl/SocketFrameHandler$1
答案 0 :(得分:1)
当没有足够的时间停止应用程序并且在同一位置部署更新的spring boot jar之后立即发生重启时,就会发生这种情况。 给足够的时间后,这没有发生。如果有问题将更新。