Bug 66320 - NPE in checkResources
Summary: NPE in checkResources
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 9
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 9.0.68
Hardware: PC All
: P2 critical (vote)
Target Milestone: -----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-23 11:12 UTC by Peter Rader
Modified: 2022-10-27 08:38 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Rader 2022-10-23 11:12:38 UTC
I can not deploy a application to the webapps folder. This is the exception:

23-Oct-2022 13:10:19.744 SCHWERWIEGEND [Catalina-utility-1] org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren Während der Hintergrund Thread abgearbeitet wurde trat eine Exception auf
        java.lang.NullPointerException: Cannot invoke "String.toLowerCase(java.util.Locale)" because "docBase" is null
                at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1345)
                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1654)
                at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)
                at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
                at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)
                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)
                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)
                at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)
                at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
                at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
                at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
                at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
                at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.base/java.lang.Thread.run(Thread.java:831)



This is my context.xml (from conf/Catalina/)


<Context path="/xxx" copyXML="true" URIEncoding="UTF-8" addWebinfClassesResources="true" cookies="false" antiResourceLocking="true">
        <Resource name="jdbc/database" auth="Container"
                xxx ></Resource>
        <Resource name="jdbc/database-ro" xxx></Resource>
        <Parameter name="self.url" value="xxx"></Parameter>
        <Parameter name="ISSUER_CN" value="xxx"></Parameter>
        <Parameter name="ISSUER_OU" value="Access"></Parameter>
        <Parameter name="ISSUER_ON" value="xxx"></Parameter>
        <Parameter name="ISSUER_ISO3166A2" value="DE"></Parameter>
        <Parameter name="xxx" value="latin1"></Parameter>
        <Parameter name="cppDir" value="d:/" />
        <Parameter name="xxx" value="d:/asdf" />
</Context>


xxx is obfuscated for security reasons.
Comment 1 Mark Thomas 2022-10-23 11:31:05 UTC
Bugzilla is not a support forum. Please use the Apache Tomcat users mailing list.

https://tomcat.apache.org/lists.html#tomcat-users
Comment 2 Peter Rader 2022-10-24 23:05:50 UTC
A Nullpointerexception is a exception. A condition your responsibilities did neither catch nor handle. If all exceptions are support-requests we do not need bugfixing, we do not need you nor tomcat. Find a adequate message or handle the exception! 

You act like fireman bless and initiate fire to keep work from you. You better kill people to have no responsibilities. Go away kid!
Comment 3 Mark Thomas 2022-10-25 07:15:14 UTC
The information provided in the description indicates that the root cause is a configuration error. Support for configuration errors is provided on the mailing lists, not in Bugzilla.

Given the flexibility and extensibility of Apache Tomcat, the code does not aim to handle every possible user error by catching the exception and providing an error message. In many cases, such as this, the default exception and stack trace provides all the information required.

Given the tone of comment #2 I strongly recommend you read https://www.apache.org/foundation/policies/conduct.html before you ask for support on the users mailing list. I also recommend http://www.catb.org/~esr/faqs/smart-questions.html
Comment 4 Peter Rader 2022-10-26 22:03:42 UTC
You can not tell what the config problem is, so you are wrong. The stacktrace does not contain all informations required to solve the problem. If so neither this report exists nor you need to guide me to the mailing-list.

If I am stupid, as you say, and the informaitions exists in the stacktrace, you wont ever tell me "indicates that the root cause". You would say "clearly points out that the root cauase". You did not wrote the latter one because its false and you know it.

Thats why your first comment is a offense. The conditions are not set because you can breakt it and threat other persons. Fuck off asshole!
Comment 5 Mark Thomas 2022-10-27 08:38:38 UTC
Advice in comment #3 not followed.

User disabled.