Я работаю над веб-приложением Java 8 с Spring и Spring Security .Моя IDE Intellij IDEA Ultimate , приложение разворачивается с Intellij на Tomcat 8.5 .В процессе сборки используются два профиля Maven .Если я пытаюсь запустить приложение с помощью Intellij Tomcat Run Configuration, я иногда (не каждый раз, что тоже странно) получаю FileNotFoundExceptions для jars внутри target\webapp\WEB-INF\lib\
.
Пример ErrorStack:
17-May-2019 13:23:11.715 SCHWERWIEGEND [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.reload Exception starting Context with name [/collphir]
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/collphir]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3839)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:291)
at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5612)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1389)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1361)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.io.FileNotFoundException: C:\GITROOT\adesso\collphir4_backend\target\webapp\WEB-INF\lib\spring-data-jpa-1.11.1.RELEASE.jar (Das System kann die angegebene Datei nicht finden)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.isMultiRelease(AbstractSingleArchiveResourceSet.java:121)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:250)
at org.apache.catalina.webresources.StandardRoot.getResourcesInternal(StandardRoot.java:327)
at org.apache.catalina.webresources.CachedResource.validateResources(CachedResource.java:140)
at org.apache.catalina.webresources.Cache.getResources(Cache.java:147)
at org.apache.catalina.webresources.StandardRoot.getResources(StandardRoot.java:315)
at org.apache.catalina.webresources.StandardRoot.getClassLoaderResources(StandardRoot.java:231)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:146)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5062)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 8 more
Caused by: java.io.FileNotFoundException: C:\GITROOT\adesso\collphir4_backend\target\webapp\WEB-INF\lib\spring-data-jpa-1.11.1.RELEASE.jar (Das System kann die angegebene Datei nicht finden)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:196)
at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:181)
at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:308)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.isMultiRelease(AbstractSingleArchiveResourceSet.java:116)
... 17 more