Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45459
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Jul 2008 14:29:27 +0000 (14:29 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 Jul 2008 14:29:27 +0000 (14:29 +0000)
Provide info on possible cause of exception.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@680710 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/LocalStrings.properties
java/org/apache/catalina/core/StandardContext.java

index 28f4eca..a9c5da6 100644 (file)
@@ -66,6 +66,7 @@ naming.namingContextCreationFailed=Creation of the naming context failed: {0}
 standardContext.invalidWrapperClass={0} is not a subclass of StandardWrapper
 standardContext.alreadyStarted=Context has already been started
 standardContext.applicationListener=Error configuring application listener of class {0}
+standardContext.applicationListenerIAE=Error configuring application listener of class {0}. One possible cause is a lack of a public zero argument constructor.
 standardContext.applicationSkipped=Skipped installing application listeners due to previous error(s)
 standardContext.badRequest=Invalid request path ({0}).
 standardContext.crlfinurl=The URL pattern "{0}" contains a CR or LF and so can never be matched.
index 0d721f2..5cfd513 100644 (file)
@@ -3783,6 +3783,11 @@ public class StandardContext
                     listeners[i] + "'");
             try {
                 results[i] = instanceManager.newInstance(listeners[i]);
+            } catch (IllegalAccessException iae) {
+                getLogger().error
+                (sm.getString("standardContext.applicationListenerIAE",
+                              listeners[i]), iae);
+            ok = false;
             } catch (Throwable t) {
                 getLogger().error
                     (sm.getString("standardContext.applicationListener",