当 使用 idea maven 将项目打包运行的时候,能够成功运行,但是总会跑到 xxx\xxx\lib 下 找jar包
如下异常:
java.io.FileNotFoundException: D:\workspaceIdea\ywjc-refactor\target\lib\javax.annotation-api-1.3.2.jar (ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒·▒▒▒▒) at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:166) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:130) ~[na:1.8.0_211] at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_211] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211] 2019-06-25 09:03:14.577 WARN 10224 --- [ost-startStop-1] o.a.tomcat.util.scan.StandardJarScanner : Failed to scan [file:/D:/workspaceIdea/ywjc-refactor/target/lib/jackson-datatype-jdk8-2.9.6.jar] from classloader hierarchy java.io.FileNotFoundException: D:\workspaceIdea\ywjc-refactor\target\lib\jackson-datatype-jdk8-2.9.6.jar (ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒·▒▒▒▒) at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:166) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:130) ~[na:1.8.0_211] at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_211] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211] 2019-06-25 09:03:14.578 WARN 10224 --- [ost-startStop-1] o.a.tomcat.util.scan.StandardJarScanner : Failed to scan [file:/D:/workspaceIdea/ywjc-refactor/target/lib/jackson-datatype-jsr310-2.9.6.jar] from classloader hierarchy java.io.FileNotFoundException: D:\workspaceIdea\ywjc-refactor\target\lib\jackson-datatype-jsr310-2.9.6.jar (ϵͳ▒Ҳ▒▒▒ָ▒▒▒▒·▒▒▒▒) at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:225) ~[na:1.8.0_211] at java.util.zip.ZipFile.<init>(ZipFile.java:155) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:166) ~[na:1.8.0_211] at java.util.jar.JarFile.<init>(JarFile.java:130) ~[na:1.8.0_211] at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:65) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:374) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:309) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:266) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:229) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) [tomcat-embed-jasper-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411) [tomcat-embed-core-8.5.31.jar!/:8.5.31] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_211] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_211] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_211] 2019-06-25 09:03:14.578 WARN 10224 --- [ost-startStop-1] o.a.tomcat.util.scan.StandardJarScanner : Failed to scan [file:/D:/workspaceIdea/ywjc-refactor/target/lib/jackson-module-parameter-names-2.9.6.jar] from classloader hierarchy
此异常不影响 正常访问和操作,但是总是决定很烦,找了很久,没找到解决方案,特此记录一下,愿大神看到,给个解决思路。
若以后找到了解决思路也会把解决方案发到下面 .... 时间 2019-06-25 09:18