jetty websocket HttpConnection ClassCastException



Jetty-独立的WebSocket服务器

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

我的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>

和我的依赖列表

    <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>

我从战争文件中排除了所有码头罐。

最常见的原因:不要在战争的WEB-INF/lib 中包含码头类

相关内容

  • 没有找到相关文章

最新更新