Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem that application startup fails but tomcat does not report an error?

Shulou Source: shulou.com Published: 2022-06-01 18:06:36 09月24日 Update

This article will explain in detail how to solve the problem of application startup failure but tomcat does not report errors. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Find a problem

Recently, I encountered a strange problem that the application failed to start, but tomcat did not report any logs, and it is useless for log4j.properties log level to write debug level.

Solution process

In this case, you can try to add a logging.properties file to the classpath directory of the web application.

Handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler # Handler specific properties. # Describes specific configuration info for Handlers. # org.apache.juli.FileHandler.level = FINEorg.apache.juli.FileHandler.directory = ${catalina.base} / logs org.apache.juli.FileHandler.prefix = error-debug. Java.util.logging.ConsoleHandler.level = FINEjava.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

It was found that our mapper file was miswritten. Just make some changes.

This is the end of this article on "how to solve the problem of application startup failure but tomcat does not report errors". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Questions applications articles files logs more levels good practical content bizarre that is situations articles directories knowledge processes references help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft MariaDB Huawei NVidia