javatomcattomcat7tomcat8jcifs

Tomcat 8.5.15 unable to find jcifs.jar


Recently we upgraded from apache-tomcat-7.0.76-x64 to apache-tomcat-8.5.15-x64 The installation is the standard installation on windows the additional jars we are putting in libs are :

  1. axis.jar -- a Apache eXtensible Interaction System a XML based Web service framework
  2. commons-logging-api-1.1.1.jar -- for logging
  3. jtds-1.2.2.jar -- a JDBC 3.0 driver for Microsoft SQL Server
  4. ojdbc6.jar -- a Driver Oracle database
  5. xercesImpl.jar -- for xml parsing
  6. xml-apis.jar -- for xml parsing

Below is the error which I can see when I start tomcat

19-Jul-2017 19:23:22.146 WARNING [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Failed to scan [file:/D:/Compass8.8/apache-tomcat-8.5.15-x64-Compass881-18080/lib/jcifs.jar] from classloader hierarchy
 java.io.FileNotFoundException: D:\Compass8.8\apache-tomcat-8.5.15-x64-Compass881-18080\lib\jcifs.jar (The system cannot find the file specified)
    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:49)
    at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:338)
    at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:288)
    at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262)
    at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104)
    at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1107)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1841)
    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)

When I checked I did not find any references for jcifs in the tomcat installation directory.


Solution

  • Your problem is jtds. If you look in the manifest.mf file inside the jtds jar, you will see that it is looking for jcifs.jar on its classpath.

    If you do not plan on using named pipes to connect to SQL Server then you do not need jcifs.jar on your classpath.

    The fix for Tomcat is the following:

    The error comes from Tomcat trying to scan jcifs.jar for TLD's. The solution is to add jcifs.jar to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip property in catalina.properties.