java环境 spring boot 2.0.4.RELEASE jdk 1.8 编码 UTF-8  spring-cloud.version Finchley.RELEASE;

经测试 把对应的 poi 文件导入导出的文件和引入jar删除了就可以了,不删的话只能在 工具中重启不能打成jar 

以下是报错信息:

2019-01-23 11:17:02.224 [main] INFO  c.n.d.modelquery.NariDcloudModelqueryApplic
ation -
                                The following profiles are active: dev
2019-01-23 11:17:02.256 [main] INFO  o.s.b.w.s.c.AnnotationConfigServletWebServe
rApplicationContext -
                                Refreshing org.springframework.boot.web.servlet.
context.AnnotationConfigServletWebServerApplicationContext@3cef309d: startup dat
e [Wed Jan 23 11:17:02 CST 2019]; parent: org.springframework.context.annotation
.AnnotationConfigApplicationContext@6e3c1e69
2019-01-23 11:17:02.989 [main] ERROR org.springframework.boot.SpringApplication
-
                                Application run failed
java.lang.IllegalStateException: Error processing condition on org.springframewo
rk.boot.autoconfigure.jmx.JmxAutoConfiguration.objectNamingStrategy
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.
matches(SpringBootCondition.java:64)
        at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(
ConditionEvaluator.java:108)
        at org.springframework.context.annotation.ConfigurationClassBeanDefiniti
onReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader
.java:180)
        at org.springframework.context.annotation.ConfigurationClassBeanDefiniti
onReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefiniti
onReader.java:141)
        at org.springframework.context.annotation.ConfigurationClassBeanDefiniti
onReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
        at org.springframework.context.annotation.ConfigurationClassPostProcesso
r.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328)
        at org.springframework.context.annotation.ConfigurationClassPostProcesso
r.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233)
        at org.springframework.context.support.PostProcessorRegistrationDelegate
.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.ja
va:271)
        at org.springframework.context.support.PostProcessorRegistrationDelegate
.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91)
        at org.springframework.context.support.AbstractApplicationContext.invoke
BeanFactoryPostProcessors(AbstractApplicationContext.java:694)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:532)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicat
ionContext.refresh(ServletWebServerApplicationContext.java:140)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.
java:762)
        at org.springframework.boot.SpringApplication.refreshContext(SpringAppli
cation.java:398)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:330)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:1258)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:1246)
        at com.nari.dcloud.modelquery.NariDcloudModelqueryApplication.main(NariD
cloudModelqueryApplication.java:22)
        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.IllegalStateException: Failed to introspect Class [org.spri
ngframework.boot.autoconfigure.jmx.JmxAutoConfiguration] from ClassLoader [org.s
pringframework.boot.loader.LaunchedURLClassLoader@49c2faae]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(Reflectio
nUtils.java:659)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtil
s.java:556)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtil
s.java:541)
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(Ref
lectionUtils.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:718)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.determineTargetType(AbstractAutowireCapableBeanFactory.java:659)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.predictBeanType(AbstractAutowireCapableBeanFactory.java:627)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
ryBean(AbstractBeanFactory.java:1489)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
ryBean(AbstractBeanFactory.java:1012)
        at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.add
BeanTypeForNonAliasDefinition(BeanTypeRegistry.java:180)
        at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.add
BeanTypeForNonAliasDefinition(BeanTypeRegistry.java:160)
        at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.add
BeanType(BeanTypeRegistry.java:153)
        at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.upd
ateTypesIfNecessary(BeanTypeRegistry.java:215)
        at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.get
NamesForType(BeanTypeRegistry.java:115)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.coll
ectBeanNamesForType(OnBeanCondition.java:265)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getB
eanNamesForType(OnBeanCondition.java:254)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getM
atchingBeans(OnBeanCondition.java:196)
        at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getM
atchOutcome(OnBeanCondition.java:116)
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.
matches(SpringBootCondition.java:47)
        ... 25 common frames omitted
Caused by: java.time.DateTimeException: Invalid value for MonthOfYear (valid val
ues 1 - 12): 0
        at java.time.temporal.ValueRange.checkValidValue(Unknown Source)
        at java.time.temporal.ChronoField.checkValidValue(Unknown Source)
        at java.time.LocalDate.of(Unknown Source)
        at java.time.LocalDateTime.of(Unknown Source)
        at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.decode
MsDosFormatDateTime(CentralDirectoryFileHeader.java:130)
        at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTim
e(CentralDirectoryFileHeader.java:119)
        at org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:55)

        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:252)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:232)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:220)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:177)
        at org.springframework.boot.loader.jar.JarFile.getEntry(JarFile.java:217
)
        at org.springframework.boot.loader.LaunchedURLClassLoader.lambda$defineP
ackage$0(LaunchedURLClassLoader.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.boot.loader.LaunchedURLClassLoader.definePackage(
LaunchedURLClassLoader.java:131)
        at org.springframework.boot.loader.LaunchedURLClassLoader.definePackageI
fNecessary(LaunchedURLClassLoader.java:112)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(Laun
chedURLClassLoader.java:81)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getDeclaredMethods(Unknown Source)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(Reflectio
nUtils.java:641)
        ... 43 common frames omitted
2019-01-23 11:17:02.989 [main] INFO  o.s.b.w.s.c.AnnotationConfigServletWebServe
rApplicationContext -
                                Closing org.springframework.boot.web.servlet.con
text.AnnotationConfigServletWebServerApplicationContext@3cef309d: startup date [
Wed Jan 23 11:17:02 CST 2019]; parent: org.springframework.context.annotation.An
notationConfigApplicationContext@6e3c1e69
2019-01-23 11:17:03.004 [main] WARN  org.springframework.boot.SpringApplication
-
                                Unable to close ApplicationContext
java.lang.IllegalStateException: Failed to introspect Class [org.springframework
.boot.autoconfigure.jmx.JmxAutoConfiguration] from ClassLoader [org.springframew
ork.boot.loader.LaunchedURLClassLoader@49c2faae]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(Reflectio
nUtils.java:659)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtil
s.java:556)
        at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtil
s.java:541)
        at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(Ref
lectionUtils.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:718)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.determineTargetType(AbstractAutowireCapableBeanFactory.java:659)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.predictBeanType(AbstractAutowireCapableBeanFactory.java:627)
        at org.springframework.beans.factory.support.AbstractBeanFactory.isFacto
ryBean(AbstractBeanFactory.java:1489)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
doGetBeanNamesForType(DefaultListableBeanFactory.java:419)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeanNamesForType(DefaultListableBeanFactory.java:389)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeansOfType(DefaultListableBeanFactory.java:510)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.
getBeansOfType(DefaultListableBeanFactory.java:502)
        at org.springframework.context.support.AbstractApplicationContext.getBea
nsOfType(AbstractApplicationContext.java:1198)
        at org.springframework.boot.SpringApplication.getExitCodeFromMappedExcep
tion(SpringApplication.java:892)
        at org.springframework.boot.SpringApplication.getExitCodeFromException(S
pringApplication.java:878)
        at org.springframework.boot.SpringApplication.handleExitCode(SpringAppli
cation.java:864)
        at org.springframework.boot.SpringApplication.handleRunFailure(SpringApp
lication.java:813)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:341)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:1258)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java
:1246)
        at com.nari.dcloud.modelquery.NariDcloudModelqueryApplication.main(NariD
cloudModelqueryApplication.java:22)
        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.time.DateTimeException: Invalid value for MonthOfYear (valid val
ues 1 - 12): 0
        at java.time.temporal.ValueRange.checkValidValue(Unknown Source)
        at java.time.temporal.ChronoField.checkValidValue(Unknown Source)
        at java.time.LocalDate.of(Unknown Source)
        at java.time.LocalDateTime.of(Unknown Source)
        at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.decode
MsDosFormatDateTime(CentralDirectoryFileHeader.java:130)
        at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.getTim
e(CentralDirectoryFileHeader.java:119)
        at org.springframework.boot.loader.jar.JarEntry.<init>(JarEntry.java:55)

        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:252)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:232)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:220)
        at org.springframework.boot.loader.jar.JarFileEntries.getEntry(JarFileEn
tries.java:177)
        at org.springframework.boot.loader.jar.JarFile.getEntry(JarFile.java:217
)
        at org.springframework.boot.loader.LaunchedURLClassLoader.lambda$defineP
ackage$0(LaunchedURLClassLoader.java:141)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.springframework.boot.loader.LaunchedURLClassLoader.definePackage(
LaunchedURLClassLoader.java:131)
        at org.springframework.boot.loader.LaunchedURLClassLoader.definePackageI
fNecessary(LaunchedURLClassLoader.java:112)
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(Laun
chedURLClassLoader.java:81)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getDeclaredMethods(Unknown Source)
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(Reflectio
nUtils.java:641)
        ... 28 common frames omitted

更多推荐

spring boot 项目 启动正常 但是用maven 打包jar后 在cmd 启动报错。