Java-Tomcat 8.5.15无法找到jcifs.jar
作者:互联网
最近,我们从apache-tomcat-7.0.76-x64升级到apache-tomcat-8.5.15-x64
安装是Windows上的标准安装
我们放入库中的其他jar是:
> axis.jar-一个Apache可扩展交互系统,一个基于XML的Web服务框架
> commons-logging-api-1.1.1.jar-用于记录
> jtds-1.2.2.jar-用于Microsoft SQL Server的JDBC 3.0驱动程序
> ojdbc6.jar-Oracle驱动程序数据库
> xercesImpl.jar-用于xml解析
> xml-apis.jar-用于xml解析
下面是我启动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安装目录中没有找到jcifs的任何引用.
解决方法:
您的问题是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属性.
标签:tomcat8,tomcat,tomcat7,jcifs,java 来源: https://codeday.me/bug/20191025/1931708.html