问题
I work on Eclipse with an embedded Tomcat (8.0.24). I ran mvn clean package install and got a build success. However, when I start tomcat by running a main method in Eclipse (as it's an embedded Tomcat), I got lots of error like :
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)
I listed some of the concerned .jar :
- com\sun\xml\bind\jaxb-xjc\2.1.7\jsr173_1.0_api.jar
- com\sun\xml\bind\jaxb-xjc\2.1.7\activation.jar
- com\sun\xml\bind\jaxb-xjc\2.1.7\jaxb-impl.jar
- com\sun\xml\bind\jaxb-xjc\2.1.7\jaxb-api.jar
com\sun\xml\bind\jaxb-xjc\2.1.7\activation.jar
com\sun\xml\bind\jaxb-impl\2.1.7\jaxb1-impl.jar
- com\sun\xml\bind\jaxb-impl\2.1.7\jsr173_1.0_api.jar
- com\sun\xml\bind\jaxb-impl\2.1.7\activation.jar
com\sun\xml\bind\jaxb-impl\2.1.7\jaxb-api.jar
com\sun\xml\messaging\saaj\saaj-impl\1.3.3\activation.jar
com\sun\xml\messaging\saaj\saaj-impl\1.3.3\saaj-api.jar
com\sun\xml\ws\jaxws-rt\2.1.7\stax-utils.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\streambuffer.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\stax-ex.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\activation.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\jaxb-impl.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\jaxb-api.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\resolver.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\woodstox.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\sjsxp.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\jsr173_api.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\saaj-impl.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\saaj-api.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\jsr250-api.jar
- com\sun\xml\ws\jaxws-rt\2.1.7\jsr181-api.jar
com\sun\xml\ws\jaxws-rt\2.1.7\jaxws-api.jar
javax\xml\soap\saaj-api\1.3\servlet.jar
- javax\xml\soap\saaj-api\1.3\jax-qname.jar
- javax\xml\soap\saaj-api\1.3\activation.jar
- javax\xml\soap\saaj-api\1.3\jaxp-api.jar
I already deleted the content of repository in .m2 and eclipse->project->maven->update project->update project (and force update of snapshot/release).
I checked in the indicated locations and indeed those .jar don't exist. I am a maven's beginner so maybe my error is stupid...
来源:https://stackoverflow.com/questions/50294354/embedded-tomcat-failed-to-scan