嗨,我需要将我的Spring Boot应用程序部署到Wildfly 8.1中,我遇到以下异常:
引起:java.lang.RuntimeException:java.lang.ClassCastException:org.apache.tomcat.websocket.server.WsServerContainer无法转发到io.undertow.servs.core.DeploymentManagerImpl的io.undertow.websockets.jsr.ServerWebSocketContainer.部署(DeploymentManagerImpl.java:219)org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72) at org.jboss.msc.service.ServiceControllerImpl $ StartTask.startService(ServiceControllerImpl.java:1948)[jboss-msc-1.2.2.Final.jar:1.2.2.Final] at org.jboss.msc.service.ServiceControllerImpl $ StartTask.run(ServiceControllerImpl.java:1881)[jboss-msc-1.2.2.Final.jar:1.2.2.Final] ... 3更多引起:java.lang.ClassCastException:org.apache.tomcat. websocket.server.WsServerContainer无法转发到io.undertow.websockets.jsr.Bootst的io.undertow.websockets.jsr.ServerWebSocketContainer rap $ WebSocketListener.contextInitialized(Bootstrap.java:69)at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:190) ......还有7个
似乎我的websockets和消息传递的设置可能是罪魁祸首?我正在看这个https://github.com/joshlong/boot-examples/issues/2并没有提出的解决方案似乎适合我.这是我的pom的依赖:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.6.RELEASE</version>
</parent>
<dependencies>
<!--Testing-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${apache.httpcomponents.version}</version>
</dependency>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring4</artifactId>
</dependency>
<dependency> …Run Code Online (Sandbox Code Playgroud)