gpt4 book ai didi

java - org.eclipse.jetty.websocket.jsr356.server.ServerContainer 无法转换为 org.apache.tom cat.websocket.server.WsServerContaine

转载 作者:行者123 更新时间:2023-12-02 10:54:47 25 4
gpt4 key购买 nike

    2018-08-15 16:05:57.353:WARN:oejw.WebAppContext:main: Failed startup of context o.e.j.w.WebAppContext@6a400542{/,file:/o
pt/meituan/fd/apps/fd-crm/webroot/,STARTING}
java.lang.ClassCastException: org.eclipse.jetty.websocket.jsr356.server.ServerContainer cannot be cast to org.apache.tom
cat.websocket.server.WsServerContainer
at org.apache.tomcat.websocket.server.WsFilter.init(WsFilter.java:40)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1345)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1338)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:501)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
at org.eclipse.jetty.server.Server.start(Server.java:387)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbsConnection Reset By PeertractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:354)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.sankuai.mms.boot.AbstractBootstrap.start(AbstractBootstrap.java:139)
at com.sankuai.mms.boot.AbstractBootstrap.boot(AbstractBootstrap.java:66)
at com.sankuai.mms.boot.Bootstrap.main(Bootstrap.java:28)
2018-08-15 16:05:57.355:INFO:oejs.AbstractNCSARequestLog:main: Opened /opt/logs/fd/fd-crm/fd-crm.request.log.2018-08-15
2018-08-15 16:05:57.366:INFO:oejs.ServerConnector:main: Started ServerConnector@3e20116c{HTTP/1.1}{0.0.0.0:8060}
2018-08-15 16:05:57.366:INFO:oejs.Server:main: Started @154910ms

运行项目,出现此异常。 HTTP响应503。仅在产品环境中找到。开发或预发布(数据库与产品相同)环境即可。
历史代码版本可以部署成功。主要变化是使用 spring-boot 2.0.0.RELEASE 导入我自己的 jar。

    <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.2.6.v20141205</version>
</dependency>

最佳答案

您有混合代码。

java.lang.ClassCastException: 
org.eclipse.jetty.websocket.jsr356.server.ServerContainer
cannot be cast to
org.apache.tomcat.websocket.server.WsServerContainer
at org.apache.tomcat.websocket.server.WsFilter.init(WsFilter.java:40)

这表示您有一个 tomcat 依赖项(tomcat websocket 服务器)尝试在 Jetty 内初始化。

关于java - org.eclipse.jetty.websocket.jsr356.server.ServerContainer 无法转换为 org.apache.tom cat.websocket.server.WsServerContaine,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51856129/

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