首页 新闻 会员 周边 捐助

springboot2.0.3打包成功,运行失败

0
悬赏园豆:80 [待解决问题]

报错信息:

java.lang.IllegalArgumentException: name

我集成了mybatis-plus,在IDE中运行没有问题,但是使用mvn打包发布的使用报出了错。

估计这个错误只有一种情况吧,,,,,,百度了,google了好久,没有解决。请大佬指点指点。

完整报错信息:

2018-07-24 11:37:19.963 INFO 8996 --- [ main] com.cyou.ck.CkApplication : Starting CkApplication v0.0.1-SNAPSHOT on SX003249 w
ith PID 8996 (E:\ck\target\ck-0.0.1-SNAPSHOT.jar started by wangxiyue in E:\ck)
2018-07-24 11:37:19.968 INFO 8996 --- [ main] com.cyou.ck.CkApplication : No active profile set, falling back to default profi
les: default
2018-07-24 11:37:20.039 INFO 8996 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.cont
ext.AnnotationConfigServletWebServerApplicationContext@71c7db30: startup date [Tue Jul 24 11:37:20 CST 2018]; root of context hierarchy
2018-07-24 11:37:21.450 ERROR 8996 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalArgumentException: name
at sun.misc.URLClassPath$Loader.findResource(Unknown Source) ~[na:1.8.0_144]
at sun.misc.URLClassPath$1.next(Unknown Source) ~[na:1.8.0_144]
at sun.misc.URLClassPath$1.hasMoreElements(Unknown Source) ~[na:1.8.0_144]
at java.net.URLClassLoader$3$1.run(Unknown Source) ~[na:1.8.0_144]
at java.net.URLClassLoader$3$1.run(Unknown Source) ~[na:1.8.0_144]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_144]
at java.net.URLClassLoader$3.next(Unknown Source) ~[na:1.8.0_144]
at java.net.URLClassLoader$3.hasMoreElements(Unknown Source) ~[na:1.8.0_144]
at org.springframework.boot.loader.LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.hasMoreElements(LaunchedURLClassLoader.java:198
) ~[ck-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at sun.misc.CompoundEnumeration.next(Unknown Source) ~[na:1.8.0_144]
at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source) ~[na:1.8.0_144]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindAllClassPathResources(PathMatchingResourcePatternResolver.java:
337) ~[spring-core-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findAllClassPathResources(PathMatchingResourcePatternResolver.java:31
9) ~[spring-core-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:286) ~[spring-c
ore-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:49
1) ~[spring-core-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:282) ~[spring-c
ore-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1309) ~[spring-context-5.0.7.RELE
ASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.GenericApplicationContext.getResources(GenericApplicationContext.java:233) ~[spring-context-5.0.7.RELEASE
.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponen
tProvider.java:421) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponen
tProvider.java:316) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:275) ~[spring-context-5.0.7.
RELEASE.jar!/:5.0.7.RELEASE]
at org.mybatis.spring.mapper.ClassPathMapperScanner.doScan(ClassPathMapperScanner.java:163) ~[mybatis-spring-1.3.2.jar!/:1.3.2]
at org.mybatis.spring.annotation.MapperScannerRegistrar.registerBeanDefinitions(MapperScannerRegistrar.java:104) ~[mybatis-spring-1.3.2.jar!/:1.
3.2]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBe
anDefinitionReader.java:358) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at java.util.LinkedHashMap.forEach(Unknown Source) ~[na:1.8.0_144]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinit
ionReader.java:357) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBean
DefinitionReader.java:145) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java
:117) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328)
~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java
:233) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDel
egate.java:273) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:
93) ~[spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-
context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.7.RELEASE.ja
r!/:5.0.7.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring
-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at com.cyou.ck.CkApplication.main(CkApplication.java:19) [classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_144]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [ck-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [ck-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [ck-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [ck-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]

方家小白的主页 方家小白 | 初学一级 | 园豆:74
提问于:2018-07-24 12:00

这个就是你打的jar包或war包没有找到你程序要用到的jar包

番茄vs西红柿 6年前
< >
分享
所有回答(2)
0

打包的时候是不是资源文件没有打进去啊?pom里面设置一下

番茄先生 | 园豆:911 (小虾三级) | 2018-07-24 17:18
0

请问楼主最后是怎么解决的?

GottaHaveYou | 园豆:202 (菜鸟二级) | 2020-01-15 19:02
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册