我已经开发了一个应用程序,现在正尝试将它部署在 Tomcat 上。当我start.bat
在 Tomcat 目录中启动文件时。我的控制台没有显示任何错误,当我打开日志文件时,我看到了这个错误:
java.lang.ClassNotFoundException: com.sun.xmk.ws.transport.http.servlet.WSServletContextListener
在许多论坛上,人们说我没有添加jaxws-rt.jar
lib。但我已经添加了它。首先,我将它添加为 maven 中的依赖项。之后我删除了依赖项并从官方网站下载了库并将其添加到我的 lib 文件夹中。这也没有帮助。那么我该如何解决这个错误呢?
更新
完整的堆栈跟踪
SEVERE: Error configuring application listener of class
com.sun.xmk.ws.transport.http.servlet.WSServletContextListener
java.lang.ClassNotFoundException: com.sun.xmk.ws.transport.http.servlet.WSServletContextListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)