Bootstrap

Tomcat 启动卡住,日志显示 At least one JAR was scanned for TLDs yet contained no TLDs.

现象

Tomcat 启动后,控制台输出卡在了:

At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

错误排查

因为应用一直没有成功,并且控制台输出上述信息后就停止了,就理所应当的以为卡住的原因就是它,然后疯狂的百度/谷歌/GPT关键字,各种方法都试过了,但是都没有效果,还是卡着不动。

正确排查

使用jstack获取当前 Java 进程的堆栈信息,发现是应用本身卡在了 *** 连接上,和 Tomcat 最后卡住的日志无任何关系。

反思

日志和问题,有时候并不是因果。

程序没有反应,jstack 往往是最有力的工具。

;