当我尝试在Wildfly中部署战争时,它显示了这些错误。 我应该如何处理?
我尝试通过引用以下页面来构建登录页面:https://spring.io/guides/gs/securing-web/
谢谢。
使用的服务器:wildfly 14.0.1
17:38:58,265错误[org.jboss.msc.service.fail](ServerService线程 池-75)MSC000001:无法启动服务jbo ss.deployment.unit。“ login-0.1.0.war” .undertow-deployment: 服务jboss.deployme中的org.jboss.msc.service.StartException nt.unit。“ login-0.1.0.war” .undertow-deployment: java.lang.RuntimeException:java.lang.ClassCastException:类 无法强制转换org.apach e.tomcat.websocket.server.WsServerContainer 到io.undertow.websockets.jsr.ServerWebSocketContainer类 (org.apache.tomcat.websocket.server.WsServerContainer未命名 加载程序'deployment.login-0.1.0.war'模块@ 514be 281; io.undertow.websockets.jsr.ServerWebSocketContainer未命名 加载程序'io.undertow.websocket@2.0.13.Fi nal'的模块@ ae58986) 网址是org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentServ ice $ 1.run(UndertowDeploymentService.java:81) 在java.base / java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:515) 在java.base / java.util.concurrent.FutureTask.run(FutureTask.java:264) 在org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavin gRunnable.java:35) 在org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:198 5) 在org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExec utor.java:1487) 在org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.j ava:1378) 在java.base / java.lang.Thread.run(Thread.java:834) 在org.jboss.threads@2.3.2.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485) 引起原因:java.lang.RuntimeException:java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerCo容器类不能为 强制转换为io.undertow.websockets.jsr.ServerWebSocketContainer类 (org.apache.tomcat.websocket.server。WsServerContainer处于未命名状态 加载程序'deployment.login-0.1.0.war'的模块@ 514be281; io.undertow.websockets.jsr.Serv erWebSocketContainer未命名 加载程序'io.undertow.websocket@2.0.13.Final'的模块@ ae58986) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl .java:252) 网址是org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentServ ice.startContext(UndertowDeploymentService.java:96) 网址是org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentServ ice $ 1.run(UndertowDeploymentService.java:78) ... 8更多原因:java.lang.ClassCastException:类org.apache.tomcat.websocket.server.WsServerContainer无法强制转换为 cl ass io.undertow.websockets.jsr.ServerWebSocketContainer (org.apache.tomcat.websocket.server.WsServerContainer位于联合国医学杂志 加载程序'deployment.login-0.1.0.war'的模块@ 514be281; io.undertow.websockets.jsr.ServerWebSocketContainer的名称 加载程序'io.undertow.websocket@2.0.13.Final'的模块@ ae58986) 在io.undertow.websocket@2.0.13.Final//io.undertow.websockets.jsr.Bootstrap$WebSocketListener.contextInitialized (Bootstrap.java:126) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.ApplicationListeners.contextInitialized(Applicatio nListeners.java:187) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl .java:216) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl .java:185) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(Serv letRequestContextThreadSetupAction.java:42) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassL oaderSetupAction.java:43) 在org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.security.SecurityContextThreadSet upAction.lambda $ create $ 0(SecurityContextThreadSetupAction.java:105) 在org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfo Service $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 在org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfo Service $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 在org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfo Service $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 在org.wildfly.extension.undertow@14.0.1.Final//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfo Service $ UndertowThreadSetupAction.lambda $ create $ 0(UndertowDeploymentInfoService.java:1502) 在io.undertow.servlet@2.0.13.Final//io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl .java:250) ...还有10个
17:38:58,274错误[org.jboss.as.controller.management-operation] (DeploymentScanner线程-1)WFLYCTL0013:操作(“部署”) 失败-地址:([(“ deployment” =>“ login-0.1.0.war”)])-失败 描述:{“ WFLYCTL0080:服务失败” => {“ jboss.deployment.unit。\” login-0.1.0.war \“。undertow-deployment” => “ java.lang.RuntimeException:java.lang.Class CastException:类 org.apache.tomcat.websocket.server.WsServerContainer无法转换为 io.undertow.websockets .jsr.ServerWebSocketContainer类 (org.apache.tomcat.websocket.server.WsServerContainer未命名 加载程序'depl oyment.login-0.1.0.war'@ 514be281的模块; io.undertow.websockets.jsr.ServerWebSocketContainer未命名 加载程序'i o.undertow.websocket@2.0.13.Final'的模块@ ae58986) 引起原因:java.lang.RuntimeException:java.lang.ClassCastException:类 无法强制转换org.apache.tomcat.websocket.server.WsServ erContainer 到io.undertow.websockets.jsr.ServerWebSocketContainer类 (org.apache.tomcat.websocket.ser ver.WsServerContainer未命名 加载程序'deployment.login-0.1.0.war'的模块@ 514be281; io.undertow.websockets.jsr。 ServerWebSocketContainer未命名 加载程序'io.undertow.websocket@2.0.13.Final'的模块@ ae58986) 由以下原因引起:java.lang.ClassCastException:类org.apache.tomcat.websocket.server.WsServerContainer无法强制转换 o类io.undertow.websockets.jsr.ServerWebSocketContainer (org.apache.tomcat.websocket.server.WsServerContainer未命名 加载程序'deployment.login-0.1.0.war'的模块@ 514be281; io.undertow.websockets.jsr.ServerWebSocketContainer未命名 加载程序'io.undertow.websocket@2.0.13.Final'的模块@ ae58986)“}} 17:38:58,377 INFO [org.jboss.as.server](DeploymentScanner线程- 1)WFLYSRV0010:部署了“ login-0.1.0.war”(runtim e-name: “登录-0.1.0.war”)17:38:58,379 INFO [org.jboss.as.controller] (DeploymentScanner-threads-1)WFLYCTL0183:服务状态报告 WFLYCTL0186:无法启动的服务:服务 jboss.deployment.unit。“ login-0.1.0.war” .undertow-deployment: java.lang.RuntimeException:java.lang.ClassCastException:类 不能强制转换org.apache.tomcat.websocket.server.WsServerContainer 到io.undertow.websockets.jsr.ServerWebSocketContainer类 (org.apache.tomcat.websocket.server.WsServerCo容器未命名 加载程序'deployment.login-0.1.0.war'的模块@ 514be281; io.undertow.websockets.jsr.ServerWebSocke tContainer未命名 加载程序'io.undertow.websocket@2.0.13.Final'的模块@ ae58986)
这是我的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>login</groupId>
<artifactId>login</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>
<properties>
<start-class>hello.MvcConfig</start-class>
<java.version>1.8</java.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
谢谢。