当前位置: 首页 > 工具软件 > common-tools > 使用案例 >

jar启动出错:Failed to get nested archive for entry BOOT-INF/lib/activiti-core-common-dependencies-7.1.0

轩辕瑞
2023-12-01

**SpringBoot+Gradle集成activiti7遇到的错误,找不到jar

在IDEA可以正常启动打包,启动jar就会报错

错误内如以下代码**

Exception in thread "main" java.lang.IllegalStateException: Failed to get nested
 archive for entry BOOT-INF/lib/activiti-core-common-dependencies-7.1.0.M6.pom
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchi
ve(JarFileArchive.java:108)
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchi
ves(JarFileArchive.java:86)
        at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPat
hArchives(ExecutableArchiveLauncher.java:70)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)

Caused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/act
iviti-core-common-dependencies-7.1.0.M6.pom'
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.
java:254)
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.
java:239)
        at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchi
ve(JarFileArchive.java:103)
        ... 4 more
Caused by: java.io.IOException: Unable to find ZIP central directory records aft
er reading 3083 bytes
        at org.springframework.boot.loader.jar.CentralDirectoryEndRecord.<init>(
CentralDirectoryEndRecord.java:65)
        at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(Cent
ralDirectoryParser.java:52)
        at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:121)
        at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:109)
        at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntr
y(JarFile.java:287)
        at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(Ja
rFile.java:262)
        at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.
java:250)
        ... 6 more


***
网上查了好多说是jar没下完,把包删了从新update就好了,试了好多遍也不行。
最后发现是版本问题
使用了  7.1.0.M6的版本
后来换成7.0.0.Beta1就可以正常启动jar了
compile group: 'org.activiti', name: 'activiti-engine', version: '7.0.0.Beta1'
***
 类似资料: