java吧 关注:1,235,426贴子:12,702,624
  • 1回复贴,共1

spring-boot 打jar包启动报错,求助,eclipse里启动正常

只看楼主收藏回复

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.IllegalArgumentException: Unable to load factories from location [META-INF/spring.factories]
at org.springframework.core.io.support.SpringFactoriesLoader.loadSpringFactories(SpringFactoriesLoader.java:147)
at org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(SpringFactoriesLoader.java:119)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:443)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:435)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:271)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:252)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265)
at com.ccsgo.resourcepool.RootApp.main(RootApp.java:18)
... 8 more
Caused by: java.util.zip.ZipException: invalid code lengths set
at java.util.zip.InflaterInputStream.read(Unknown Source)
at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipInflaterInputStream.java:56)
at java.io.FilterInputStream.read(Unknown Source)
at java.util.Properties$LineReader.readLine(Unknown Source)
at java.util.Properties.load0(Unknown Source)
at java.util.Properties.load(Unknown Source)
at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:140)
at org.springframework.core.io.support.PropertiesLoaderUtils.loadProperties(PropertiesLoaderUtils.java:122)
at org.springframework.core.io.support.SpringFactoriesLoader.loadSpringFactories(SpringFactoriesLoader.java:136)
... 16 more


IP属地:江苏1楼2018-11-28 13:09回复
    你最好使用maven工具打包,如果使用eclipse打包会产生很多问题,,


    IP属地:山东2楼2019-10-21 16:19
    回复