Spring Boot,Tomcat& Gradle:xalan&没有找到序列化器罐子

时间:2017-07-06 06:34:10

标签: spring-boot gradle

昨天我尝试将一些弹簧启动项目合并到一个新项目中,从那时起,我在启动项目时在ide控制台中遇到以下错误:

Ignoring Class-Path entry xercesImpl.jar found in/home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xalan-2.7.2.jar as /home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xercesImpl.jar does not exist
Ignoring Class-Path entry xml-apis.jar found in/home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xalan-2.7.2.jar as /home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xml-apis.jar does not exist
Ignoring Class-Path entry serializer.jar found in/home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xalan-2.7.2.jar as /home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/serializer.jar does not exist
Ignoring Class-Path entry xml-apis.jar found in/home/test/.gradle/caches/modules-2/files-2.1/xalan/serializer/2.7.2/24247f3bb052ee068971393bdb83e04512bb1c3c/serializer-2.7.2.jar as /home/test/.gradle/caches/modules-2/files-2.1/xalan/serializer/2.7.2/24247f3bb052ee068971393bdb83e04512bb1c3c/xml-apis.jar does not exist

这些消息打印为System.err消息。

检查路径会给出以下图片:

test@localhost ~/.gradle/caches/modules-2/files-2.1/xalan $ ls -lRt
.:
total 8
drwxr-xr-x 3 test test 4096 Jul  6 07:54 serializer
drwxr-xr-x 3 test test 4096 Jul  6 07:54 xalan

./serializer:
total 4
drwxr-xr-x 5 test test 4096 Jul  6 07:54 2.7.2

./serializer/2.7.2:
total 12
drwxr-xr-x 2 test test 4096 Jul  6 07:54 fe9c3d37a49238fac9d4d6c4f5bbd8c334da787a
drwxr-xr-x 2 test test 4096 Jul  6 07:54 24247f3bb052ee068971393bdb83e04512bb1c3c
drwxr-xr-x 2 test test 4096 Jul  6 07:54 454c86397279a646a38afad68bd8f2f465de7bfe

./serializer/2.7.2/fe9c3d37a49238fac9d4d6c4f5bbd8c334da787a:
total 3320
-rw-r--r-- 1 test test 3395855 Jul  6 07:54 serializer-2.7.2-sources.jar

./serializer/2.7.2/24247f3bb052ee068971393bdb83e04512bb1c3c:
total 272
-rw-r--r-- 1 test test 276420 Jul  6 07:54 serializer-2.7.2.jar

./serializer/2.7.2/454c86397279a646a38afad68bd8f2f465de7bfe:
total 4
-rw-r--r-- 1 test test 1089 Jul  6 07:54 serializer-2.7.2.pom

./xalan:
total 4
drwxr-xr-x 5 test test 4096 Jul  6 07:54 2.7.2

./xalan/2.7.2:
total 12
drwxr-xr-x 2 test test 4096 Jul  6 07:54 fe9c3d37a49238fac9d4d6c4f5bbd8c334da787a
drwxr-xr-x 2 test test 4096 Jul  6 07:54 d55d3f02a56ec4c25695fe67e1334ff8c2ecea23
drwxr-xr-x 2 test test 4096 Jul  6 07:54 97d232191877cf441ac5b72d2cb05a3580ba9e7e

./xalan/2.7.2/fe9c3d37a49238fac9d4d6c4f5bbd8c334da787a:
total 3320
-rw-r--r-- 1 test test 3395855 Jul  6 07:54 xalan-2.7.2-sources.jar

./xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23:
total 3084
-rw-r--r-- 1 test test 3154938 Jul  6 07:54 xalan-2.7.2.jar

./xalan/2.7.2/97d232191877cf441ac5b72d2cb05a3580ba9e7e:
total 4
-rw-r--r-- 1 test test 1277 Jul  6 07:54 xalan-2.7.2.pom

由于错误之前我在应用程序启动时在我的控制台中收到这些消息(对于之前未找到的所有jar):

2017-07-06 08:04:50.785  WARN 18346 --- [ost-startStop-1] o.a.tomcat.util.scan.StandardJarScanner  : Failed to scan [file:/home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xercesImpl.jar] from classloader hierarchy

java.io.FileNotFoundException: /home/test/.gradle/caches/modules-2/files-2.1/xalan/xalan/2.7.2/d55d3f02a56ec4c25695fe67e1334ff8c2ecea23/xercesImpl.jar (No such file or directory)
    at java.util.zip.ZipFile.open(Native Method) ~[na:1.8.0_131]
    at java.util.zip.ZipFile.<init>(ZipFile.java:219) ~[na:1.8.0_131]
    at java.util.zip.ZipFile.<init>(ZipFile.java:149) ~[na:1.8.0_131]
    at java.util.jar.JarFile.<init>(JarFile.java:166) ~[na:1.8.0_131]
    at java.util.jar.JarFile.<init>(JarFile.java:130) ~[na:1.8.0_131]
    at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:60) ~[tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:49) ~[tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:338) ~[tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:288) ~[tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.jasper.servlet.TldScanner.scanJars(TldScanner.java:262) [tomcat-embed-jasper-8.5.15.jar:8.5.15]
    at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:104) [tomcat-embed-jasper-8.5.15.jar:8.5.15]
    at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) [tomcat-embed-jasper-8.5.15.jar:8.5.15]
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) [tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-8.5.15.jar:8.5.15]
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.5.15.jar:8.5.15]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]

我删除了整个gradle缓存但它没有改变任何东西。 我试图用data / jpa,rest和mvc(在我有三个单项目之前)构建一个spring boot应用程序,这些是我在build.gradle中的当前依赖项:

dependencies {
    compile('org.springframework.boot:spring-boot-starter')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile "org.springframework.boot:spring-boot-starter-data-jpa"
    compile "org.springframework.boot:spring-boot-starter-data-rest"

    compile "org.postgresql:postgresql"
    compile("javax.validation:validation-api")
    compile("org.hibernate:hibernate-java8")

    compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")

    compile('javax.servlet:jstl')
    compileOnly('org.springframework.boot:spring-boot-starter-tomcat')
    compileOnly('org.apache.tomcat.embed:tomcat-embed-jasper')

    compile "org.projectlombok:lombok"
    compile "com.google.guava:guava"
    compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.5'

    runtime('org.springframework.boot:spring-boot-devtools')

    testCompile('org.springframework.boot:spring-boot-starter-test')
}

0 个答案:

没有答案