Bug 58094 - [7.0.63 RC] "Null component Tomcat:type=Cache" error messages in testsuite logs
Summary: [7.0.63 RC] "Null component Tomcat:type=Cache" error messages in testsuite logs
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Catalina (show other bugs)
Version: trunk
Hardware: PC All
: P2 regression (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2015-07-02 15:37 UTC by Konstantin Kolinko
Modified: 2015-07-02 16:14 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2015-07-02 15:37:42 UTC
Running tests for release candidate of Tomcat 7.0.63, I see a lot of the following messages in the logs:

<some date and time> org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Tomcat:type=Cache,host=localhost,context=/login

The above message is from org.apache.catalina.authenticator.TestSSOnonLoginAndBasicAuthenticator test, but the same message (with different context path) occurs in many test cases. When running whole testsuite with Java 7 and all 3 connectors, the message is found in 165 test result files out of 543.

I am running with Access Logging enabled by the following setting in build.properties, but I think it does not matter:


This message is absent from 7.0.62 test logs, so it is a regression in this specific version of Tomcat 7.

Looking into Apache Gump logs, this message is present in tomcat-tc7.0.x-test-nio results for the above mentioned test case, but absent in tomcat-tc8.0.x-test-nio, tomcat-trunk-test-nio, so Tomcat 8 and trunk do not have this issue.
Comment 1 Konstantin Kolinko 2015-07-02 15:51:20 UTC
This log message is not observed during normal standalone use of Tomcat (e.g. smoke-testing the examples webapp). So it is something specific to embedded Tomcat configuration used by test cases.
Comment 2 Remy Maucherat 2015-07-02 16:04:41 UTC
I see no way this is a regression. It's just the cache that is null, probably because the resources is not the usual BaseDirContext and so the cache is null. It's harmless and could use a null check.
Comment 3 Remy Maucherat 2015-07-02 16:14:44 UTC
r1688854 for a fix that removed the bad logging for me. It's really specific to the testsuite and its empty resources.