Tomcat 8 enable debug logging to list unneeded jars

后端 未结 3 1331
耶瑟儿~
耶瑟儿~ 2020-11-30 11:24

When starting Tomcat 8 on Arch Linux ARM I get the following warning:

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debu

3条回答
  •  难免孤独
    2020-11-30 12:18

    Try debugging for everything by:

    1. Adding this to the end of your logging.properties file located in {CATALINA-HOME}/conf:

      #To see the most detailed level of logging for all classes, uncomment the following line:
      org.apache.catalina.level=FINEST
      
    2. Restart Tomcat

    3. Run the following from Terminal to get a list of jars that need to be skipped (courtesy of @joseph-lust on this post):

      egrep "No TLD files were found in \[file:[^\]+\]" {CATALINA-HOME}/logs/catalina.out -o | egrep "[^]/]+.jar" -o | sort | uniq | sed -e 's/.jar/.jar,\\/g' > ~/skips.txt
      
    4. Open skips.txt in your user home directory

    5. Add this list to {CATALINA-HOME}/conf/catalina.properties after the following line:

      org.apache.catalina.startup.TldConfig.jarsToSkip=
      
    6. Make sure to remove/comment out this when you are done to prevent your log files from growing too large

    I am still not sure why this happens, as it seems to work for most to uncomment the TldLocationsCache line.

提交回复
热议问题