我有一个带有Java 1.8的Springboot v2项目,当我尝试在WildFly 10上部署我的Sprringboot项目时,不断收到此错误
19:12:25,295 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "HealthCheck.war")]) - failure description: { "WFLYCTL0080: Failed services" => {"jboss.module.service."deployment.HealthCheck.war".main" => "org.jboss.msc.service.StartException in service jboss.module.service."deployment.HealthCheck.war".main: WFLYSRV0179: Failed to load module: deployment.HealthCheck.war:main Caused by: org.jboss.modules.ModuleNotFoundException: jdk.unsupported:main"}, "WFLYCTL0412: Required services that are not installed:" => ["jboss.module.service."deployment.HealthCheck.war".main"], "WFLYCTL0180: Services with missing/unavailable dependencies" => undefined我已经创建了一个joss-ployment-structure.xml并在其中添加了";jdk.unsupport";依赖项,我还尝试将该依赖项添加到MANIFEST.MF中,还尝试在maven-war插件下添加缺少的";jdk.unsupport";依赖项,但没有成功。
推荐答案这是由于Spring-core5.3.*中引入的breaking change,导致上述问题的Spring-core库的变化是commit。如果您使用Spring boot版本2.4.*,那么您肯定会面临这个问题,因为它拉出了Spring-core5.3.*的传递依赖。务实的方法是在可能的情况下升级WildFly版本(最新版本是22.0.1.Final,wildfly 10.1.0.Final 已于近5年前于2016年8月19日发布)或将您的Spring Boot版本降级为'2.3.*.RELEASE'。
解决方法 对于那些无法升级WildFly服务器但处于使用最新Spring版本(5.3.*)的用户,请遵循下面的解决方案。实际问题是Spring-core 5.3.x包含MANIFEST.MF文件条目Dependencies: jdk.unsupported。如果我们从JAR的MANIFEST.MF文件中删除特定条目,我们就可以使用Wildfly10.x版本本身中的Spring-core 5.3.x。
要修补5.3.x并将其拉入类路径,需要执行以下步骤:
更多推荐
Springboot WildFly 10部署错误jdk。找不到不支持的模块
发布评论