Spring Boot 由于zip文件关闭,Sping Boot Tomcat服务器未启动

eimct9ow  于 2023-03-12  发布在  Spring
关注(0)|答案(1)|浏览(202)

我正在使用Sping Boot 3.0.2(Tomcat 10.1.5),同时开始得到一个错误。我已经分享了我的完整堆栈错误。

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[/IAMWeb]]
        at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)

Caused by: java.lang.IllegalStateException: zip file closed
        at java.base/java.util.zip.ZipFile.ensureOpen(ZipFile.java:831)
        at java.base/java.util.zip.ZipFile.getManifestName(ZipFile.java:1057)
        at java.base/java.util.zip.ZipFile$1.getManifestName(ZipFile.java:1100)
        at java.base/java.util.jar.JarFile.getManEntry(JarFile.java:937)
        at java.base/java.util.jar.JarFile.checkForSpecialAttributes(JarFile.java:1000)
        at java.base/java.util.jar.JarFile.isMultiRelease(JarFile.java:389)
        at org.apache.tomcat.util.scan.JarFileUrlJar.<init>(JarFileUrlJar.java:68)
        at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:41)
        at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:393)
        at org.apache.tomcat.util.scan.StandardJarScanner.processURLs(StandardJarScanner.java:328)
        at org.apache.tomcat.util.scan.StandardJarScanner.doScanClassPath(StandardJarScanner.java:271)
        at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:234)
        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:83)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5144)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        ... 43 common frames omitted
xhv8bpkk

xhv8bpkk1#

要在Sping Boot 3.0.x中使用JSP,您必须使用-Djdk.util.jar.enableMultiRelease=false启动应用程序,例如:

$ java -jar -Djdk.util.jar.enableMultiRelease=false your-application.war

相关问题