linux环境下jar包部署运行问题 Exception in thread "main" java.lang.IllegalStateException: Failed to get nested
linux环境下,以jar文件部署如下:
1.准备好linux环境,安装所需要的jdk版本;
2.使用文件上传工具上传a.jar文件;
3.直接使用java -jar a.jar & 命令进行项目启动;
增量维护如下:
4.使用命令解压a.jar包,命令:jar -xvf a.jar;
5.与解压后的目录保持一致上传增量文件;
6.使用命令将指定文件更新到a.jar里面,
命令为jar -uvf0 a.jar 指定文件相对路径;重启即可;
遇到如下问题:
Exception in thread “main” java.lang.IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/spring-boot-starter-web-1.5.18.RELEASE.jar
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:109)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:87)
at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:72)
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/spring-boot-starter-web-1.5.18.RELEASE.jar’
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:252)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:237)
at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:104)
… 4 more
Caused by: java.lang.IllegalStateException: Unable to open nested entry ‘BOOT-INF/lib/spring-boot-starter-web-1.5.18.RELEASE.jar’. It has been compressed and nested jar files must be stored without compression. Please check the mechanism used to create your executable jar file
at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:285)
at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:260)
at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:248)
… 6 more
解决办法为:使用jar -uvf0命令进行增量替换
- 点赞 1
- 收藏
- 分享
- 文章举报
- Linux环境下,Exception in thread "main" java.lang.NoClassDefFoundError
- 运行jar文件出现了Exception in thread “main" java.lang.UnsupportedClassVersionError
- Eclipse下好使,但是cmd下执行java运行class文件提示Exception in thread "main" java.lang.NoClassDefFoundError问题
- Eclipse下好使,但是cmd下执行java运行class文件提示Exception in thread "main" java.lang.NoClassDefFoundError问题
- Linux 下运行Java程序报“Exception in thread "main" java.lang.NoClassDefFoundError”
- Spark本地运行出错问题:Exception in thread "main" java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Lja
- Drools 运行时出现Exception in thread "main" java.lang.RuntimeException: wrong class format 的问题
- [Nutch]问题解决:Exception in thread "main" java.io.IOException: Failed to set permissions of path
- Eclipse下好使,但是cmd下执行java运行class文件提示Exception in thread "main" java.lang.NoClassDefFoundError问题
- idea运行的时候出现的问题Exception in thread “main” java.lang
- 解决Exception in thread "main" java.lang.OutOfMemoryError: Java heap space问题
- java运行时出现“Exception in thread"main"java.lang.NoSuchMethodError:m
- Exception in thread "main" java.lang.NoClassDefFoundError 问题及其解决方法
- Exception in thread "main" java.lang.NoClassDefFoundError 问题的解决办法
- Exception in thread "main" java.lang.IllegalArgumentException: node to traverse cannot be null!
- Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instant
- Exception in thread "main" java.lang.InternalError: Can't connect to X11 window
- windows下eclipse远程连接hadoop错误“Exception in thread"main"java.io.IOException: Call to Master.Hadoop/172.20.145.22:9000 failed ”
- Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lan
- Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library