This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 44b439d Improve error reporting for resource lookup problems
44b439d is described below
commit 44b439da7ad49a045bd44648fca6a9faaa418292
Author: remm <[email protected]>
AuthorDate: Fri Feb 12 10:47:05 2021 +0100
Improve error reporting for resource lookup problems
Since everything is allowed, it is wrong to report some random input as
being a bad relative URI.
---
java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java | 2 +-
java/org/apache/catalina/startup/LocalStrings.properties | 2 +-
webapps/docs/changelog.xml | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git
a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
index f907bde..cedc1cd 100644
--- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
+++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java
@@ -109,7 +109,7 @@ public class CatalinaBaseConfigurationSource implements
ConfigurationSource {
try {
uri = getURIInternal(name);
} catch (IllegalArgumentException e) {
- throw new
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name),
e);
+ throw new
IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name));
}
// Obtain the input stream we need
diff --git a/java/org/apache/catalina/startup/LocalStrings.properties
b/java/org/apache/catalina/startup/LocalStrings.properties
index 271ca31..27c7c9b 100644
--- a/java/org/apache/catalina/startup/LocalStrings.properties
+++ b/java/org/apache/catalina/startup/LocalStrings.properties
@@ -30,7 +30,7 @@ catalina.stopServer=No shutdown port configured. Shut down
server through OS sig
catalina.stopServer.connectException=Could not contact [{0}:{1}] (base port
[{2}] and offset [{3}]). Tomcat may not be running.
catalina.usage=usage: java org.apache.catalina.startup.Catalina [ -config
{pathname} ] [ -nonaming ] [ -generateCode [ {pathname} ] ] [ -useGeneratedCode
] { -help | start | stop }
-catalinaConfigurationSource.cannotObtainURL=Cannot obtain URL for the relative
path [{0}]. Check that catalina.base is set.
+catalinaConfigurationSource.cannotObtainURL=Cannot obtain resource for
specified location [{0}]: no readable file, classloader resource, or this is
not a resolvable URI
connector.noSetExecutor=Connector [{0}] does not support external executors.
Method setExecutor(java.util.concurrent.Executor) not found.
connector.noSetSSLImplementationName=Connector [{0}] does not support changing
the SSL implementation. Method setSslImplementationName(String) not found.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a71b7c8..1cc241e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -110,6 +110,10 @@
Revert an incorrect fix for a potential resource leak that broke
deployment via the Ant deploy task. (markt)
</fix>
+ <fix>
+ Improve error message for failed ConfigurationSource lookups in the
+ Catalina implementation. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]