Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

In the tomcat log, there are multiple java.io.FileNotFoundException exceptions similar to the following:

Code Block
org.apache.tomcat.util.scan.StandardJarScanner scan
WARNING: Failed to scan [file:/tmp/sealights/httpcore-4.4.5.jar] from classloader hierarchy
java.io.FileNotFoundException: /tmp/sealights/httpcore-4.4.5.jar (No such file or directory)
                at java.util.zip.ZipFile.open(Native Method)
                at java.util.zip.ZipFile.<init>(ZipFile.java:219)
                at java.util.zip.ZipFile.<init>(ZipFile.java:149)
                at java.util.jar.JarFile.<init>(JarFile.java:166)
                at java.util.jar.JarFile.<init>(JarFile.java:130)
                at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:60)
                at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:43)
                at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:322)
                at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:272)
                at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1887)
                at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1127)
                at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:779)
                at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306)
                at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5202)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
                at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:745)

...

Cause

This is not an error, but rather just a warning that was introduced in Tomcat version 8.0.34 after fixing Apache's Bug 59226

Solution

Since Tomcat 8.0.38 you can configure and disable the scanning of the MANIFEST.MF file, see The Jar Scanner Component

To turn scanning off, add the following line

...

in context.xml:

Code Block
<Context>
  <JarScanner scanManifest="false"/>
</Context>

...

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1422e
sortmodified
showSpacefalsesortmodified
reversetrue
typepage
cqllabel in ( "java" , "filenotfoundexception" , "tomcat" ) and type = "page" and space = "SUP"
labelsTomcat FileNotFoundException Java

...

Page Properties
hiddentrue


Related issues