jetty websocket HttpConnection ClassCastException

jetty websocket HttpConnection ClassCastException,websocket,jetty,Websocket,Jetty,我面临的问题与上述链接中描述的相同。有人能解决这个问题吗 我的Pom详细信息: <plugin> <groupId>org.simplericity.jettyconsole</groupId> <artifactId>jetty-console-maven-plugin</artifactId> <version>1.5.6</version&g

我面临的问题与上述链接中描述的相同。有人能解决这个问题吗

我的Pom详细信息:

<plugin>
            <groupId>org.simplericity.jettyconsole</groupId>
            <artifactId>jetty-console-maven-plugin</artifactId>
            <version>1.5.6</version>
            <configuration>
                <additionalDependencies>
                    <additionalDependency>
                        <artifactId>jetty-console-jsp-plugin</artifactId>
                    </additionalDependency>
                    <additionalDependency>
                        <artifactId>jetty-console-startstop-plugin</artifactId>
                    </additionalDependency>
                    <additionalDependency>
                        <groupId>com.fixflyer.share</groupId>
                        <artifactId>jc-contextpath-plugin</artifactId>
                        <version>${flyer.jccontextpathplugin}</version>
                    </additionalDependency>
                    <additionalDependency>
                        <groupId>org.eclipse.jdt.core.compiler</groupId>
                        <artifactId>ecj</artifactId>
                        <version>${ecj.version}</version>
                    </additionalDependency>
                </additionalDependencies>
                <properties>
                    contextPath=/abc
                </properties>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>createconsole</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

org.simplericity.jettyconsole
jetty控制台maven插件
1.5.6
jetty控制台jsp插件
jetty控制台startstop插件
com.fixflyer.share
jc上下文路径插件
${flyer.jccontextpathplugin}
org.eclipse.jdt.core.compiler
欧洲法院
${ecj.version}
contextPath=/abc
包裹
createconsole
还有我的依赖列表

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-websocket</artifactId>
        <version>4.0.7.RELEASE</version>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-common</artifactId>
        <version>9.2.3.v20140905</version>
        <exclusions>
            <exclusion>
                 <groupId>org.eclipse.jetty.websocket</groupId>
                 <artifactId>websocket-api</artifactId>
            </exclusion>
            <exclusion>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-io</artifactId>
            </exclusion>
            <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-util</artifactId>
            </exclusion>
        </exclusions>   
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-api</artifactId>
        <version>9.2.3.v20140905</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-servlet</artifactId>
        <version>9.2.3.v20140905</version>
        <exclusions>
            <exclusion>
                 <groupId>org.eclipse.jetty.websocket</groupId>
                 <artifactId>websocket-api</artifactId>
            </exclusion>
        </exclusions>   
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-io</artifactId>
        <version>9.2.3.v20140905</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>9.2.3.v20140905</version>
     <exclusions>
        <exclusion>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-http</artifactId>
        </exclusion>
        <exclusion>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-io</artifactId>
        </exclusion>
     </exclusions>  
   </dependency>
   <dependency>
        <groupId>org.eclipse.jetty.websocket</groupId>
        <artifactId>websocket-server</artifactId>
        <version>9.2.3.v20140905</version>
        <exclusions>
            <exclusion>
                 <groupId>org.eclipse.jetty.websocket</groupId>
                 <artifactId>websocket-common</artifactId>
            </exclusion>
            <exclusion>
                 <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>websocket-client</artifactId>
            </exclusion>
            <exclusion>
                 <groupId>org.eclipse.jetty.websocket</groupId>
                <artifactId>websocket-servlet</artifactId>
            </exclusion>
            <exclusion>
                 <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-http</artifactId>
            </exclusion>
            <exclusion>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-server</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

org.springframework
弹簧网袋
4.0.7.1发布
org.springframework
spring上下文
org.springframework
弹簧芯
org.springframework
弹簧网
org.eclipse.jetty.websocket
网匣公用
9.2.3.v20140905
org.eclipse.jetty.websocket
websocket api
org.eclipse.jetty
码头
org.eclipse.jetty
码头
org.eclipse.jetty.websocket
websocket api
9.2.3.v20140905
org.eclipse.jetty.websocket
websocket servlet
9.2.3.v20140905
org.eclipse.jetty.websocket
websocket api
org.eclipse.jetty
码头
9.2.3.v20140905
org.eclipse.jetty
jetty服务器
9.2.3.v20140905
org.eclipse.jetty
jetty http
org.eclipse.jetty
码头
org.eclipse.jetty.websocket
websocket服务器
9.2.3.v20140905
org.eclipse.jetty.websocket
网匣公用
org.eclipse.jetty.websocket
websocket客户端
org.eclipse.jetty.websocket
websocket servlet
org.eclipse.jetty
码头servlet
org.eclipse.jetty
jetty http
org.eclipse.jetty
jetty服务器

我将从war文件中排除所有jetty JAR。

最常见的原因:不要在war的
WEB-INF/lib中包含jetty类

删除jetty类没有帮助。由于HttpConnection对象由两个不同的类加载器加载,所以看起来异常即将出现。一个是URLClassloder,另一个是jetty的WebAppClassLoader。如何使它们从同一个类加载器加载以消除此异常在正常jetty执行中是不可能的。您可以发布如何配置和启动Jetty实例吗?HttpConnection始终由系统(也称为服务器)类加载器中的选择器和连接器创建/管理。webapp没有理由创建HttpConnection对象。谢谢Joakim。我在上面添加了我的pom详细信息。请看一下