当前位置:   article > 正文

Failed to get nestedarchive for entry BOOT-INF/lib/axis2-1.6.2.pom_failed to get nested archive for entry

failed to get nested archive for entry

gradle工程使用bootjar打包出jar之后,使用java -jar命令运行jar,然后程序报错

  1. Exception in thread "main" java.lang.IllegalStateException: Failed to get nestedarchive for entry BOOT-INF/lib/axis2-1.6.2.pom
  2. at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:108)
  3. at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:86)
  4. at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:70)
  5. at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
  6. at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
  7. Caused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/axis2-1.6.2.pom'
  8. at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:254)
  9. at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:239)
  10. at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:103)
  11. ... 4 more
  12. Caused by: java.io.IOException: Unable to find ZIP central directory records after reading 28780 bytes
  13. at org.springframework.boot.loader.jar.CentralDirectoryEndRecord.<init>(CentralDirectoryEndRecord.java:65)
  14. at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(CentralDirectoryParser.java:52)
  15. at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:121)
  16. at org.springframework.boot.loader.jar.JarFile.<init>(JarFile.java:109)
  17. at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:287)
  18. at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:262)
  19. at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:250)
  20. ... 6 more

查看工程,发现build.gradle文件中有一个ext: 'pom'设置,删除掉

重新打包,运行没有出现错误了

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/457489
推荐阅读
相关标签
  

闽ICP备14008679号