在Tomcat8.5中部署项目,启动项目就提示jackson-annotations-2.8.0.jar (No such file or directory)

 在Tomcat8.5中部署项目,启动项目就提示jackson-annotations-2.8.0.jar (No such file or directory),花半天的时间找问题原因,现在已经解决,正好记录一下,预防以后还出现该问题。

主要原因是:jackson-annotations-2.8.0.jar  jackson-core-2.8.10.jar  jackson-databind-2.8.0.jar. 

把pom文件修改为:


             com.fasterxml.jackson.core
             jackson-core
             2.8.0
           

          
              com.fasterxml.jackson.core
              jackson-databind
              2.8.4
          

          
                com.fasterxml.jackson.core
            jackson-annotations
            2.8.0
          

启动项目: springboot项目

在Tomcat8.5中部署项目,启动项目就提示jackson-annotations-2.8.0.jar (No such file or directory)_第1张图片

INFO [localhost-startStop-25] org.apache.catalina.core.ApplicationContext.log 2 Spring WebApplicationInitializers detected on classpath
 INFO [localhost-startStop-25] org.apache.catalina.core.ApplicationContext.log Initializing Spring embedded WebApplicationContext
 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
SEVERE [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [org.springframework.boot.web.support.SpringBootServletInitializer$1]
 java.lang.IllegalStateException: java.io.FileNotFoundException: /home/admin/sofeware/apache-tomcat-8.5.24/webapps/masoct/WEB-INF/lib/jackson-annotations-2.8.0.jar (No such file or directory)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:100)
    at org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:265)
    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:2173)
    at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:811)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1260)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:117)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4790)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:843)
    at org.apache.catalina.startup.HostConfig.undeploy(HostConfig.java:1434)
    at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1342)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1620)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
    at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1164)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1388)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1392)
    at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1360)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: /home/admin/sofeware/apache-tomcat-8.5.24/webapps/masoct/WEB-INF/lib/jackson-annotations-2.8.0.jar (No such file or directory)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.(ZipFile.java:215)
    at java.util.zip.ZipFile.(ZipFile.java:145)
    at java.util.jar.JarFile.(JarFile.java:154)
    at java.util.jar.JarFile.(JarFile.java:118)
    at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:188)
    at org.apache.tomcat.util.compat.JreCompat.jarFileNewInstance(JreCompat.java:173)
    at org.apache.catalina.webresources.AbstractArchiveResourceSet.openJarFile(AbstractArchiveResourceSet.java:316)
    at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:96)
    ... 24 more

你可能感兴趣的:(tomcat,JAVA)