Home > Software design >  Error while trying to deploy a spring 5 app in wildlfy26.1.2
Error while trying to deploy a spring 5 app in wildlfy26.1.2

Time:01-05

I'm trying to deploy spring 5 application in wildlfy 26.1.2. JDK version is 1.8

19:46:45,930 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."ECP2P.war".undertow-deployment.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ECP2P.war".undertow-deployment.UndertowDeploymentInfoService: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363) at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.IllegalArgumentException: UT010009: Servlet spring of type class org.springframework.web.servlet.DispatcherServlet does not implement jakarta.servlet.Servlet at io.undertow.servlet.api.ServletInfo.(ServletInfo.java:98) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:749) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:312) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)

CodePudding user response:

Spring 5 is JakartaEE 9 or 10 , so you either need to use WildFly 27 or 26-preview.

CodePudding user response:

If we need to use spring 5, then we need to use Jakarta EE 8 Full & Web Distribution of wildlfy 26.1.2 not WildFly Preview EE 9.1 Distribution. I was using preview, hence above error.

  • Related