启动报错:One or more listeners failed to start. Full details will be found in the appropriate container

启动报错:One or more listeners failed to start. Full details will be found in the appropriate container log file


启动时在日志中只看到以上(One or more listeners failed to start. Full details will be found in the appropriate container log file)错误日志,但是并没有把具体报错的原因打印出来,增加日志文件解决:
解决方式:
在classpath下增加配置文件logging.properties
文件中的内容为:

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = …/logs
org.apache.juli.FileHandler.prefix = error-debug.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

重新启动,即可在日志中看到错误日志。

你可能感兴趣的:(JAVA笔记)