码迷,mamicode.com
首页 > 编程语言 > 详细

在maven 构建javaweb java.nio.file.NoSuchFileException: E:\xxx\out\artifacts\xxx_war_exploded\WEB-INF\lib\mybatis-3.2.2.jar

时间:2018-09-13 22:33:39      阅读:1394      评论:0      收藏:0      [点我收藏+]

标签:ini   RKE   eva   tcl   struct   分享   idea   lan   context   


java.nio.file.NoSuchFileException: E:\xxx\out\artifacts\xxx_war_exploded\WEB-INF\lib\mybatis-3.2.2.jar at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53) at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38) at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:194) at java.base/java.nio.file.Files.readAttributes(Files.java:1755) at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:951) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:216) at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:148) at java.base/java.util.jar.JarFile.<init>(JarFile.java:324) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at org.apache.tomcat.util.compat.Jre9Compat.jarFileNewInstance(Jre9Compat.java:209) at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:149) at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:307) at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:97) at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:256) at org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281) at org.apache.catalina.webresources.Cache.getResource(Cache.java:62) at org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216) at org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225) at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2274) at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:833) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1278) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1138) at blog.control.RegisterServlet.<init>(RegisterServlet.java:19) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:151) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1032) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:761) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:133) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:844)

  出现异常 提示找不到mybatis文件

然后在WEB-INF文件中找到了mybatis文件 ,当不使用servlet时 直接测试mybatis正常 使用servlet后出现以上错误 

idea查看技术分享图片

 

 发现技术分享图片打包输出的lib文件夹为空

,(此时技术分享图片中的lib不为空,所以直接使用mybatis成功)

解决方法:

技术分享图片

选中后右键技术分享图片

问题解决

 

在maven 构建javaweb java.nio.file.NoSuchFileException: E:\xxx\out\artifacts\xxx_war_exploded\WEB-INF\lib\mybatis-3.2.2.jar

标签:ini   RKE   eva   tcl   struct   分享   idea   lan   context   

原文地址:https://www.cnblogs.com/zezeze/p/9643336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!