检测到Logback配置错误

时间:2018-04-30 13:09:57

标签: logging logback

我在我的春季启动项目中使用了logback,当我运行项目时,我得到了这个logback错误

Display
 java.lang.IllegalStateException: Logback configuration error detected:  
 ERROR in c.q.l.c.recovery.ResilientFileOutputStream@134367664 - IO  
 failure while writing to file [logs\project\serviceProvider.log]  
 java.io.IOException: Stream Closed  
     at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:162)  
     at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:208)  
     at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:74)  
     at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:59)  
     at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:115)  
     at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:303)  
     at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:276)  
     at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)  
     at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:212)  
     at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)  
     at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)  
     at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)  
     at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:74)  
     at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)  
     at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:325)  
     at org.springframework.boot.SpringApplication.run(SpringApplication.java:296)  
     at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)  
     at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)  
     at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)  
     at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)  
     at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)  
     at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)  
     at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:44)  
     at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)  
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)   
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)  
     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)  
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)  
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)  
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)  
     at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)  
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)  
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)  
     at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)  
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)  
     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)  
     at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)  
     at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)  
     at org.junit.runners.ParentRunner.run(ParentRunner.java:363)  
     at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)  
     at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)  
     at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)  
     at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)  
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
     at java.lang.reflect.Method.invoke(Method.java:498)  
     at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)  
     at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)  
     at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)  
     at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)  
     at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)  

0 个答案:

没有答案