мок-сервер работает как война внутри Tomcat
Я использую Tomcat 10.1.6 и развернул mockserver-war-5.15.0.war. Я получаю следующее исключение
Exception
jakarta.servlet.ServletException: Class [org.mockserver.mockservlet.MockServerServlet] is not a Servlet
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:676)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.base/java.lang.Thread.run(Thread.java:829)
Root Cause
java.lang.ClassCastException: class org.mockserver.mockservlet.MockServerServlet cannot be cast to class jakarta.servlet.Servlet (org.mockserver.mockservlet.MockServerServlet is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @75d334f0; jakarta.servlet.Servlet is in unnamed module of loader java.net.URLClassLoader @6477463f)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:676)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:400)
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
Любая помощь приветствуется