gpt4 book ai didi

spring - NoClassDefFoundError : DefaultLifecycleProcessor$1 when undeplying spring-messaging application

转载 作者:行者123 更新时间:2023-12-04 12:46:32 27 4
gpt4 key购买 nike

我有一个在 Tomcat 7 上运行的 Spring 应用程序。添加 WebSockets 后,我开始在日志中看到以下错误 解除部署 .

除了日志和取消部署时间的增加(它等待超时),一切正常。

添加的 WebSockets 代码中没有什么特别之处。就一个@Controller , AbstractWebSocketMessageBrokerConfigurer 的一个子类和 AbstractSecurityWebSocketMessageBrokerConfigurer 的一个子类.

怎么了?我不认为我缺少任何 jar ..我可以看到 org.springframework.context.support.DefaultLifecycleProcessor jar 里的类 spring-context-4.2.2-RELEASE我的 WEB-INF/lib 中有.匿名类 DefaultLifecycleProcessor$1也在吗。


14 Mar 2016 23:25:34,508 INFO [context.support.DefaultLifecycleProcessor] Stopping beans in phase 2147483647
14 Mar 2016 23:25:34,508 DEBUG [context.support.DefaultLifecycleProcessor] Asking bean 'stompWebSocketHandlerMapping' of type [class org.springframework.web.socket.server.support.WebSocketHandlerMapping] to stop
14 Mar 2016 23:25:34,508 WARN [context.support.DefaultLifecycleProcessor] Failed to stop bean 'stompWebSocketHandlerMapping'
java.lang.NoClassDefFoundError: org/springframework/context/support/DefaultLifecycleProcessor$1
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:229)
at org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:363)
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:202)
at org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:118)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:969)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:928)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:828)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1481)
at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1842)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5647)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1478)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1406)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1626)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.support.DefaultLifecycleProcessor$1
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
... 25 more
14 Mar 2016 23:25:34,509 DEBUG [context.support.DefaultLifecycleProcessor] Asking bean 'subProtocolWebSocketHandler' of type [class org.springframework.web.socket.messaging.SubProtocolWebSocketHandler] to stop
14 Mar 2016 23:25:34,509 WARN [context.support.DefaultLifecycleProcessor] Failed to stop bean 'subProtocolWebSocketHandler'
java.lang.NoClassDefFoundError: org/springframework/context/support/DefaultLifecycleProcessor$1
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:229)
at org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:363)
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:202)
at org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:118)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:969)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:928)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:828)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1481)
at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1842)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5647)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1478)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1406)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1626)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:745)
14 Mar 2016 23:25:34,509 DEBUG [context.support.DefaultLifecycleProcessor] Asking bean 'simpAnnotationMethodMessageHandler' of type [class org.springframework.web.socket.messaging.WebSocketAnnotationMethodMessageHandler] to stop
14 Mar 2016 23:25:34,509 WARN [context.support.DefaultLifecycleProcessor] Failed to stop bean 'simpAnnotationMethodMessageHandler'
java.lang.NoClassDefFoundError: org/springframework/context/support/DefaultLifecycleProcessor$1
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:229)
at org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:363)
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:202)
at org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:118)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:969)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:928)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:828)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1481)
at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1842)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5647)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1478)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1406)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1626)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:745)
14 Mar 2016 23:25:34,509 DEBUG [context.support.DefaultLifecycleProcessor] Asking bean 'simpleBrokerMessageHandler' of type [class org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler] to stop
14 Mar 2016 23:25:34,509 WARN [context.support.DefaultLifecycleProcessor] Failed to stop bean 'simpleBrokerMessageHandler'
java.lang.NoClassDefFoundError: org/springframework/context/support/DefaultLifecycleProcessor$1
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:229)
at org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:363)
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:202)
at org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:118)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:969)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:928)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:828)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1481)
at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1842)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5647)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1478)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1406)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1626)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:745)
14 Mar 2016 23:25:34,510 DEBUG [context.support.DefaultLifecycleProcessor] Asking bean 'userDestinationMessageHandler' of type [class org.springframework.messaging.simp.user.UserDestinationMessageHandler] to stop
14 Mar 2016 23:25:34,510 WARN [context.support.DefaultLifecycleProcessor] Failed to stop bean 'userDestinationMessageHandler'
java.lang.NoClassDefFoundError: org/springframework/context/support/DefaultLifecycleProcessor$1
at org.springframework.context.support.DefaultLifecycleProcessor.doStop(DefaultLifecycleProcessor.java:229)
at org.springframework.context.support.DefaultLifecycleProcessor.access$300(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.stop(DefaultLifecycleProcessor.java:363)
at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:202)
at org.springframework.context.support.DefaultLifecycleProcessor.onClose(DefaultLifecycleProcessor.java:118)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:969)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:928)
at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:828)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1481)
at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1842)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5647)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1028)
at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1478)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1406)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1626)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:328)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:745)
14 Mar 2016 23:26:04,511 WARN [context.support.DefaultLifecycleProcessor] Failed to shut down 5 beans with phase value 2147483647 within timeout of 30000: [stompWebSocketHandlerMapping, subProtocolWebSocketHandler, simpAnnotationMethodMessageHandler, simpleBrokerMessageHandler, userDestinationMessageHandler]

最佳答案

您是否将其打包为一个胖 jar,并且您是否在关闭正在运行的应用程序之前重新部署更新的 jar?这就是发生在我身上的事情,因为我正在使用 ansible 下载胖 jar,如果 jar 已更改,则使用处理程序重新启动应用程序。

我通过先暂存新 jar 来解决它,如果不同,请在复制暂存 jar 之前停止应用程序。

See here for more info

关于spring - NoClassDefFoundError : DefaultLifecycleProcessor$1 when undeplying spring-messaging application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36022786/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com