How to fix "JARs that were scanned but no TLDs were found in them " in Tomcat 9.0.0M10

I'm new to Java EE and trying to work on ServletContextListener and listener job is connection to database bla bla .When I am trying to start the server (Tomcat 9) it is stuck on :

"INFO: 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."

So I changed some properties in "Logging properties file" like this :

    # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

1catalina.org.apache.juli.AsyncFileHandler.level = FINE
1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina.

2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.

3manager.org.apache.juli.AsyncFileHandler.level = FINE
3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
3manager.org.apache.juli.AsyncFileHandler.prefix = manager.

4host-manager.org.apache.juli.AsyncFileHandler.level = FINE
4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter


############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = FINE
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = FINE
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler

org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = FINE
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler

# For example, set the org.apache.catalina.util.LifecycleBase logger to log
# each component that extends LifecycleBase changing state:
#org.apache.catalina.util.LifecycleBase.level = FINE

# To see debug messages in TldLocationsCache, uncomment the following line:
org.apache.jasper.compiler.TldLocationsCache.level = FINE
org.apache.jasper.servlet.TldScanner.level = FINE

# To see debug messages for HTTP/2 handling, uncomment the following line:
#org.apache.coyote.http2.level = FINE

# To see debug messages for WebSocket handling, uncomment the following line:
#org.apache.tomcat.websocket.level = FINE

All answers acceptable. Thanks for all.

This is not a bug or any kind of problem in tomcat. Tomcat is just informing you that there are jars that do not contain TLDs and you can add them to the scanner's skip list to improve startup performance. So you have two options:

  1. You can safely ignore that hint. Yet if it annoy you, you can set that specific logger to a higher logging level, and thus prevent tomcat from logging it. Just add org.apache.jasper.servlet.TldScanner.level = SEVERE to the end of logging.properties.

  2. Enable the debug logging to make tomcat list those jars and add them to the skip list. Set:

    org.apache.jasper.compiler.TldLocationsCache.level = FINE
    org.apache.jasper.servlet.TldScanner.level = FINE
    

And add the printed jars names (without the path) to tomcat.util.scan.StandardJarScanFilter.jarsToSkip=... in tomcat_dir/conf/catalina.properties

How To Repair Almost Everything, Timestamps 00:01 Slime cleaning trick 02:29 Coca-cola rust removal 02:55 Wall repair trick 03 Duration: 13:56 Posted: Apr 21, 2020 Thousands of repair manuals, tutorials, and how-to guides for DIY fixes. From electronics to cars, learn how to repair your own stuff and save yourself some money.

Setting the logging to FINE, FINEST or ALL to find all jars to exclude is not neccessary.

Here is a script that finds all jars not containing TLDs (change the TOMCAT_HOME variable to match your installation) and outputs a list on the form

jar1.jar,\
jar2.jar,\
...

that can be pasted into catalina.properties (omit the last ',\'):

#!/bin/sh
TOMCAT_HOME=/opt/tomcat
for i in `find $TOMCAT_HOME -follow -name "*jar"`
do
    jar tvf $i | grep -i tld > /dev/null
    if [ $? -ne 0 ]; then
        echo "$(basename $i),\\"
    fi
done

However, if I am correctly informed, there is a possibility in tomcat 9 to exclude all jars by changing (in catalina.properties):

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\

to

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar

(comment away the list on the lines below) and then override that decision for jars containg TLDs by changing:

tomcat.util.scan.StandardJarScanFilter.jarsToScan=\
log4j-web*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar

and add the list obtained by modifying the script above to list the jars that do contain TLDs:

#!/bin/sh
TOMCAT_HOME=/opt/tomcat
for i in `find $TOMCAT_HOME -follow -name "*jar"`
do
    jar tvf $i | grep -i tld > /dev/null
    if [ $? -eq 0 ]; then
        echo "$(basename $i),\\"
    fi
done

28 HACKS TO FIX ANYTHING QUICKLY, What if the key does not go in the lock? Use a pencil. How to protect the electric extension cord Duration: 9:51 Posted: Nov 10, 2018 Here's how: 1. Navigate to the Windows 10 Advanced Startup Options menu. On many laptops, hitting F11 as soon as you power on will 2. Click Startup Repair.

change conf\context.xml file

<Context>
    <!-- only if you do not use jsp tag -->
    <JarScanner>
        <JarScanFilter defaultPluggabilityScan="false" defaultTldScan="false"/>
    </JarScanner>
</Context>

see: https://tomcat.apache.org/tomcat-9.0-doc/config/jar-scan-filter.html

Repair Manuals for Every Thing, iFixit is a global community of people helping each other repair things. Let's fix the world, one device at a time. Troubleshoot with experts in the Answers� iFixit is a global community of people helping each other repair things. Let's fix the world, one device at a time. Troubleshoot with experts in the Answers forum—and build your own how-to guides to share with the world.

same problem i was fixed.. I think this have permission problem, so need to give full access for webapps/project folder.

iFixit: The Free Repair Manual, Whether you are new homeowner or an expert, knowing how to fix these 12 common household problems can help save you from a pricey� People Helping People Fix Stuff. Help is here! Learn how to do your own repairs and save money! This site is filled with articles written by skilled individuals. You will find step by step "How To", tips and tricks, and general guidance on fixing your stuff. Finding Solutions

12 Easy Things Everyone Should Know How to Fix, How to Fix (Just About) Everything: More Than 550 Step-by-Step Instructions for Everything from Fixing a Faucet to Removing Mystery Stains to Curing a� Easy Fix solutions have been discontinued. Instead, you can upgrade to Windows 10 and get troubleshooters that are built right in. To get Windows 10, see Windows 10 Home. Need more info on Windows 10? See Upgrade to Windows 10: FAQ. Windows 10. Windows 10 uses troubleshooters to help you solve problems with your PC. To run a troubleshooter:

How to Fix (Just About) Everything: More Than 550 Step-by-Step , Learn how to fix your broken appliance yourself, no repairman needed. Select the appliance that is giving you trouble and you'll find information on the common � How to Fix the Most Annoying Things in Windows 10. Windows 10 is great, but it has its issues, from unpredictable reboots to Cortana. Here's how to fix some of the more irritating quirks with

How To Fix A Broken Appliance, This educator's guide provides articles, videos & other resources to aid in teaching about tools, common home repair projects and vocabulary to students. Here are 6 steps to fix it yourself. Don't get frustrated and give up on a slow PC, take a few minutes to troubleshoot and remedy it. Jason Cipriani. May 7, 2020 3:00 a.m. PT.

Comments
  • Related questions: stackoverflow.com/questions/14375673 , stackoverflow.com/questions/12905001
  • @StephenC There is no difference between Tomcat 9 and 8?
  • @StephenC Because I tried all of them but still I'm getting same result, thanks.
  • Thank you for explaining, I will try and inform you.
  • Like this :" tomcat.util.scan.StandardJarScanFilter.jarsToSkip= 1org.apache.jasper.servlet.TldScanner,2org.apache.jasper.compiler.TldLocationsCache" ?
  • Sorry like this : "org.apache.jasper.compiler.TldLocationsCache.jar,org.apache.jasper.servlet.TldScanner.jar"
  • No, you must list the "jars to skip", no th etomcat classes. First you need to enable the debug logging in order to find out the names of the jars, then you add them as a comma separated list to the tomcat.util.scan.StandardJarScanFilter.jarsToSkip= property
  • Now I understood better.Thank you so much.
  • Please reword your question in a way that it is not guessing ("I think..."). As it stands right now this more looks like a comment.