I have a very weird problem with Spring Boot, I don't know why the web application which using Spring Boot cannot start and it has no output error even when I run it directly on the terminal.
java -jar /var/lib/tomcat/webapps/rasdaman.war
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' || .__|| ||| |_, | / / / /
=========||==============|/=////
:: Spring Boot :: (v1.5.2.RELEASE)
[rasdaman@osboxes rasdaman]$ echo $?
1
Here is the application class https://pastebin.com/rinWbp9z, this web application uses Liquibase to populate database schema and Spring boot version 1.5.2
. Can you please share some hint to debug?
So, the problem is, I'm using log4.properties out of war file. Then, when I starts this war, It shows very nice information like this:
Then, I added a log4j.properties file in src/main/resources with this content:
After that, I can see the detail log from Spring which make Tomcat stop:
Well, I must say, it is really impressive about how error could be hidden.
It seems, your configuration for logback is correct !
When you configure your logback-spring.xml after that the logs does not appear on the console. Instead, you need to go to the LOG_HOME location which you configured in your logback-spring.xml file.
All the logs will be in file and not on console.
Please let me know if this solves your problem.