Tomcat 8.5.15无法找到jcifs.jar

时间:2017-07-20 05:58:57

标签: java tomcat tomcat7 tomcat8 jcifs

最近我们从apache-tomcat-7.0.76-x64升级到apache-tomcat-8.5.15-x64 安装是Windows上的标准安装 我们在库中添加的额外罐子是:

  1. axis.jar - Apache可扩展交互系统基于XML的Web服务框架
  2. commons-logging-api-1.1.1.jar - 用于记录
  3. jtds-1.2.2.jar - 用于Microsoft SQL Server的JDBC 3.0驱动程序
  4. ojdbc6.jar - 驱动程序Oracle数据库
  5. xercesImpl.jar - 用于xml解析
  6. xml-apis.jar - 用于xml解析
  7. 以下是我启动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)
    

    当我检查时,我没有在tomcat安装目录中找到任何jcif的引用。

1 个答案:

答案 0 :(得分:4)

你的问题是jtds。如果你查看jtds jar里面的manifest.mf文件,你会看到它在类路径上查找jcifs.jar。

如果您不打算使用命名管道连接到SQL Server,那么您的类路径上不需要jcifs.jar。

Tomcat的修复程序如下:

错误来自Tomcat尝试扫描jcifs.jar以获取TLD。解决方案是将jcifs.jar添加到catalina.properties中的tomcat.util.scan.StandardJarScanFilter.jarsToSkip属性中。