我使用嵌入式Tomcat(8.0.24)在Eclipse上工作。我运行了mvn clean package install并获得了成功。 但是,当我通过在Eclipse中运行main方法启动tomcat时(因为它是一个嵌入式Tomcat),我得到了很多错误,如:
mai 11, 2018 3:26:20 PM org.apache.tomcat.util.scan.StandardJarScanner processURLs
WARNING: Failed to scan [file:/C:/Users/username/.m2/repository/com/sun/xml/ws/jaxws-rt/2.1.7/saaj-impl.jar] from classloader hierarchy
java.io.FileNotFoundException: C:\Users\username\.m2\repository\com\sun\xml\ws\jaxws-rt\2.1.7\saaj-impl.jar (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188)
at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65)
at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49)
at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374)
at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309)
at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266)
at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229)
at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1888)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1116)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5138)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
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)
我列出了一些有关的.jar:
com \ sun \ xml \ bind \ jaxb-xjc \ 2.1.7 \ activation.jar
COM \太阳\ XML \绑定\ JAXB-IMPL \ 2.1.7 \ jaxb1-impl.jar中
COM \太阳\ XML \绑定\ JAXB-IMPL \ 2.1.7 \ JAXB-api.jar文件
COM \太阳\ XML \消息\ SAAJ \ SAAJ-IMPL \ 1.3.3 \的activation.jar
COM \太阳\ XML \消息\ SAAJ \ SAAJ-IMPL \ 1.3.3 \ SAAJ-api.jar文件
COM \太阳\ XML \ WS \ JAXWS-RT \ 2.1.7 \ STAX-utils.jar
COM \太阳\ XML \ WS \ JAXWS-RT \ 2.1.7 \ JAXWS-api.jar文件
的javax \ XML \皂\ SAAJ-API \ 1.3 \的servlet.jar
我已经删除了.m2和eclipse-&gt; project-&gt; maven-&gt;更新项目 - &gt;更新项目(并强制更新快照/发布)中的存储库内容。
我检查了指定的位置,确实那些.jar不存在。我是一个maven的初学者,所以也许我的错误是愚蠢的......