0

I'm working on spring boot project deployed on azure server, I found an error on my logs file concerning logback:

**WARN 146 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath ERROR 146 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(spring.log,true) call failed. java.io.FileNotFoundException: spring.log (Read-only file system) at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) Exception in thread "main" java.lang.reflect.InvocationTargetException at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)**

and, this is my logback-spring.xml :

enter image description here

enter image description here

As you can see, i'm not even using RollingFileAppender on my conf file, so i don't know why he is telling me that there is a Logback configuration error?

And the second problem, i don't know why the WebApp has restarted?

Java : 11 Spring boot: 2.2.7.RELEASE Logback : 1.2.3

Could you please help me ?

Thank you,

mugiiChan
  • 1
  • 5
  • Few things. Did you recompile/mvn clean install before attempting to re-run springboot, perhaps you still have the logback.xml file with file inside your /target folder. I cant speak for why it restarted...you did not really explain how you are running it to begin with. If you want to be sure, debug by removing all logback*.xml files, do a clean install, run your springboot app and see if you get the error, then introduce the logback*.xml files again – JCompetence Feb 15 '22 at 14:50
  • [Reference](https://stackoverflow.com/questions/52911277/logback-rollingfileappender-filenotfoundexception). – RithwikBojja Feb 16 '22 at 06:30

0 Answers0