From: markt Date: Mon, 27 Sep 2010 22:01:45 +0000 (+0000) Subject: Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48644 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=d135df6cbe2e0d982fb3fd87ab7fca09f35ff35a;p=tomcat7.0 Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48644 Some Throwables must always be re-thrown git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1001923 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/mbeans/MBeanUtils.java b/java/org/apache/catalina/mbeans/MBeanUtils.java index 896e06bd1..66ee9d488 100644 --- a/java/org/apache/catalina/mbeans/MBeanUtils.java +++ b/java/org/apache/catalina/mbeans/MBeanUtils.java @@ -1072,6 +1072,7 @@ public class MBeanUtils { try { mserver = Registry.getRegistry(null, null).getMBeanServer(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); t.printStackTrace(System.out); System.exit(1); } diff --git a/java/org/apache/catalina/mbeans/ServerLifecycleListener.java b/java/org/apache/catalina/mbeans/ServerLifecycleListener.java index ee4e5a216..7ebfa77a3 100644 --- a/java/org/apache/catalina/mbeans/ServerLifecycleListener.java +++ b/java/org/apache/catalina/mbeans/ServerLifecycleListener.java @@ -48,6 +48,7 @@ import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.ContextResourceLink; import org.apache.catalina.deploy.NamingResources; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -150,9 +151,8 @@ public class ServerLifecycleListener log.error("createMBeans: MBeanException", e); } catch (Throwable t) { - + ExceptionUtils.handleThrowable(t); log.error("createMBeans: Throwable", t); - } /* @@ -180,9 +180,8 @@ public class ServerLifecycleListener log.error("destroyMBeans: MBeanException", e); } catch (Throwable t) { - + ExceptionUtils.handleThrowable(t); log.error("destroyMBeans: Throwable", t); - } // FIXME: RMI adaptor should be stopped; however, this is // undocumented in MX4J, and reports exist in the MX4J bug DB that @@ -925,6 +924,7 @@ public class ServerLifecycleListener e = t; log.error("processContainerAddChild: MBeanException", e); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("processContainerAddChild: Throwable", t); } @@ -1060,6 +1060,7 @@ public class ServerLifecycleListener e = t; log.error("processContainerRemoveChild: MBeanException", e); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("processContainerRemoveChild: Throwable", t); } diff --git a/java/org/apache/catalina/realm/JAASRealm.java b/java/org/apache/catalina/realm/JAASRealm.java index 60f985ee7..1b38fe86d 100644 --- a/java/org/apache/catalina/realm/JAASRealm.java +++ b/java/org/apache/catalina/realm/JAASRealm.java @@ -36,6 +36,7 @@ import org.apache.catalina.Container; import org.apache.catalina.LifecycleException; import org.apache.catalina.authenticator.Constants; import org.apache.catalina.util.LifecycleBase; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -390,6 +391,7 @@ public class JAASRealm try { loginContext = new LoginContext(appName, callbackHandler); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); log.error(sm.getString("jaasRealm.unexpectedError"), e); return (null); } finally { @@ -427,6 +429,7 @@ public class JAASRealm log.warn(sm.getString("jaasRealm.loginException", username), e); return (null); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); log.error(sm.getString("jaasRealm.unexpectedError"), e); return (null); } diff --git a/java/org/apache/catalina/realm/JDBCRealm.java b/java/org/apache/catalina/realm/JDBCRealm.java index 592156951..d88a93fdd 100644 --- a/java/org/apache/catalina/realm/JDBCRealm.java +++ b/java/org/apache/catalina/realm/JDBCRealm.java @@ -698,6 +698,7 @@ public class JDBCRealm Class clazz = Class.forName(driverName); driver = (Driver) clazz.newInstance(); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); throw new SQLException(e.getMessage()); } } diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java b/java/org/apache/catalina/realm/UserDatabaseRealm.java index 9de514c75..ecde2a7dc 100644 --- a/java/org/apache/catalina/realm/UserDatabaseRealm.java +++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java @@ -33,6 +33,7 @@ import org.apache.catalina.User; import org.apache.catalina.UserDatabase; import org.apache.catalina.core.StandardServer; import org.apache.catalina.util.LifecycleBase; +import org.apache.jasper.util.ExceptionUtils; /** @@ -249,6 +250,7 @@ public class UserDatabaseRealm ((StandardServer)getServer()).getGlobalNamingContext(); database = (UserDatabase) context.lookup(resourceName); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); containerLog.error(sm.getString("userDatabaseRealm.lookup", resourceName), e); diff --git a/java/org/apache/catalina/session/StandardManager.java b/java/org/apache/catalina/session/StandardManager.java index 93e2858b9..13dff8d8d 100644 --- a/java/org/apache/catalina/session/StandardManager.java +++ b/java/org/apache/catalina/session/StandardManager.java @@ -466,6 +466,7 @@ public class StandardManager extends ManagerBase { try { load(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString("standardManager.managerLoad"), t); } @@ -492,6 +493,7 @@ public class StandardManager extends ManagerBase { try { unload(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString("standardManager.managerUnload"), t); } diff --git a/java/org/apache/catalina/session/StandardSession.java b/java/org/apache/catalina/session/StandardSession.java index 9e3564d5a..f0c8deaab 100644 --- a/java/org/apache/catalina/session/StandardSession.java +++ b/java/org/apache/catalina/session/StandardSession.java @@ -57,6 +57,7 @@ import org.apache.catalina.core.StandardContext; import org.apache.catalina.realm.GenericPrincipal; import org.apache.catalina.security.SecurityUtil; import org.apache.catalina.util.Enumerator; +import org.apache.jasper.util.ExceptionUtils; import org.apache.tomcat.util.res.StringManager; /** @@ -405,6 +406,7 @@ public class StandardSession "afterSessionCreated", listener); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); try { fireContainerEvent(context, "afterSessionCreated", @@ -776,6 +778,7 @@ public class StandardSession "afterSessionDestroyed", listener); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); try { fireContainerEvent(context, "afterSessionDestroyed", @@ -877,6 +880,7 @@ public class StandardSession ((HttpSessionActivationListener)attribute) .sessionWillPassivate(event); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); manager.getContainer().getLogger().error (sm.getString("standardSession.attributeEvent"), t); } @@ -912,6 +916,7 @@ public class StandardSession ((HttpSessionActivationListener)attribute) .sessionDidActivate(event); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); manager.getContainer().getLogger().error (sm.getString("standardSession.attributeEvent"), t); } @@ -1423,6 +1428,7 @@ public class StandardSession ((HttpSessionBindingListener) unbound).valueUnbound (new HttpSessionBindingEvent(getSession(), name)); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); manager.getContainer().getLogger().error (sm.getString("standardSession.bindingEvent"), t); } @@ -1467,6 +1473,7 @@ public class StandardSession listener); } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); try { if (unbound != null) { fireContainerEvent(context, @@ -1764,6 +1771,7 @@ public class StandardSession "afterSessionAttributeRemoved", listener); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); try { fireContainerEvent(context, "afterSessionAttributeRemoved", diff --git a/java/org/apache/catalina/startup/Bootstrap.java b/java/org/apache/catalina/startup/Bootstrap.java index c50a5c076..f017aee34 100644 --- a/java/org/apache/catalina/startup/Bootstrap.java +++ b/java/org/apache/catalina/startup/Bootstrap.java @@ -33,6 +33,7 @@ import javax.management.ObjectName; import org.apache.catalina.Globals; import org.apache.catalina.security.SecurityClassLoad; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -98,6 +99,7 @@ public final class Bootstrap { catalinaLoader = createClassLoader("server", commonLoader); sharedLoader = createClassLoader("shared", commonLoader); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Class loader creation threw exception", t); System.exit(1); } @@ -391,6 +393,7 @@ public final class Bootstrap { try { bootstrap.init(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); t.printStackTrace(); return; } @@ -420,6 +423,7 @@ public final class Bootstrap { log.warn("Bootstrap: command \"" + command + "\" does not exist."); } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); t.printStackTrace(); } diff --git a/java/org/apache/catalina/startup/Catalina.java b/java/org/apache/catalina/startup/Catalina.java index 50e081eb9..058fbc35b 100644 --- a/java/org/apache/catalina/startup/Catalina.java +++ b/java/org/apache/catalina/startup/Catalina.java @@ -36,6 +36,7 @@ import org.apache.catalina.LifecycleException; import org.apache.catalina.Server; import org.apache.catalina.core.StandardServer; import org.apache.catalina.security.SecurityConfig; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.ClassLoaderLogManager; import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.digester.Digester; @@ -611,6 +612,7 @@ public class Catalina { } } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); // This will fail on JDK 1.2. Ignoring, as Tomcat can run // fine without the shutdown hook. } @@ -643,6 +645,7 @@ public class Catalina { } } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); // This will fail on JDK 1.2. Ignoring, as Tomcat can run // fine without the shutdown hook. } @@ -804,6 +807,7 @@ public class Catalina { Catalina.this.stop(); } } catch (Throwable ex) { + ExceptionUtils.handleThrowable(ex); log.error(sm.getString("catalina.shutdownHookFail"), ex); } finally { // If JULI is used, shut JULI down *after* the server shuts down diff --git a/java/org/apache/catalina/startup/CatalinaProperties.java b/java/org/apache/catalina/startup/CatalinaProperties.java index f59f07e97..213f1ad85 100644 --- a/java/org/apache/catalina/startup/CatalinaProperties.java +++ b/java/org/apache/catalina/startup/CatalinaProperties.java @@ -122,6 +122,7 @@ public class CatalinaProperties { properties.load(is); is.close(); } catch (Throwable t) { + handleThrowable(t); error = t; } } diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index f2c9504b8..342a00d5c 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -437,6 +437,7 @@ public class ContextConfig Class authenticatorClass = Class.forName(authenticatorName); authenticator = (Valve) authenticatorClass.newInstance(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString( "contextConfig.authenticatorInstantiate", authenticatorName), diff --git a/java/org/apache/catalina/startup/HostConfig.java b/java/org/apache/catalina/startup/HostConfig.java index f1e10da60..b30d71031 100644 --- a/java/org/apache/catalina/startup/HostConfig.java +++ b/java/org/apache/catalina/startup/HostConfig.java @@ -678,6 +678,7 @@ public class HostConfig } } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString("hostConfig.deployDescriptor.error", file), t); } @@ -964,6 +965,7 @@ public class HostConfig addWatchedResources(deployedApp, null, context); } } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString("hostConfig.deployWar.error", file), t); } @@ -1082,6 +1084,7 @@ public class HostConfig } addWatchedResources(deployedApp, dir.getAbsolutePath(), context); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error(sm.getString("hostConfig.deployDir.error", file), t); } @@ -1164,12 +1167,14 @@ public class HostConfig try { host.removeChild(context); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.warn(sm.getString ("hostConfig.context.remove", app.name), t); } try { context.destroy(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.warn(sm.getString ("hostConfig.context.destroy", app.name), t); } @@ -1220,12 +1225,14 @@ public class HostConfig try { host.removeChild(context); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.warn(sm.getString ("hostConfig.context.remove", app.name), t); } try { context.destroy(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.warn(sm.getString ("hostConfig.context.destroy", app.name), t); } @@ -1383,6 +1390,7 @@ public class HostConfig try { host.removeChild(host.findChild(apps[i].name)); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.warn(sm.getString ("hostConfig.context.remove", apps[i].name), t); } diff --git a/java/org/apache/catalina/startup/TldConfig.java b/java/org/apache/catalina/startup/TldConfig.java index 5ee777afb..064fbd4c1 100644 --- a/java/org/apache/catalina/startup/TldConfig.java +++ b/java/org/apache/catalina/startup/TldConfig.java @@ -437,7 +437,7 @@ public final class TldConfig implements LifecycleListener { try { stream.close(); } catch (Throwable t) { - // do nothing + ExceptionUtils.handleThrowable(t); } } } @@ -481,7 +481,7 @@ public final class TldConfig implements LifecycleListener { try { stream.close(); } catch (Throwable t) { - // do nothing + ExceptionUtils.handleThrowable(t); } } } @@ -560,7 +560,7 @@ public final class TldConfig implements LifecycleListener { try { resourceStream.close(); } catch (Throwable t) { - // do nothing + ExceptionUtils.handleThrowable(t); } } } diff --git a/java/org/apache/catalina/startup/Tool.java b/java/org/apache/catalina/startup/Tool.java index 27a2600ec..04beff4e9 100644 --- a/java/org/apache/catalina/startup/Tool.java +++ b/java/org/apache/catalina/startup/Tool.java @@ -24,6 +24,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; import org.apache.catalina.Globals; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -184,6 +185,7 @@ public final class Tool { packed.toArray(new File[0]), null); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Class loader creation threw exception", t); System.exit(1); } @@ -197,6 +199,7 @@ public final class Tool { log.debug("Loading application class " + className); clazz = classLoader.loadClass(className); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Exception creating instance of " + className, t); System.exit(1); } @@ -213,6 +216,7 @@ public final class Tool { paramTypes[0] = params.getClass(); method = clazz.getMethod(methodName, paramTypes); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Exception locating main() method", t); System.exit(1); } @@ -225,6 +229,7 @@ public final class Tool { paramValues[0] = params; method.invoke(null, paramValues); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Exception calling main() method", t); System.exit(1); } diff --git a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java index 28d1c47c1..5099e5488 100644 --- a/java/org/apache/catalina/tribes/membership/McastServiceImpl.java +++ b/java/org/apache/catalina/tribes/membership/McastServiceImpl.java @@ -36,6 +36,7 @@ import org.apache.catalina.tribes.MessageListener; import org.apache.catalina.tribes.io.ChannelData; import org.apache.catalina.tribes.io.XByteBuffer; import org.apache.catalina.tribes.util.ExecutorFactory; +import org.apache.jasper.util.ExceptionUtils; /** * A membership implementation using simple multicast. @@ -420,7 +421,8 @@ public class McastServiceImpl if (data[i]!=null && !member.equals(data[i].getAddress())) { msgservice.messageReceived(data[i]); } - }catch (Throwable t) { + } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); log.error("Unable to receive broadcast message.",t); } } diff --git a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java index f19383574..fcd39722a 100644 --- a/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java +++ b/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java @@ -37,6 +37,7 @@ import org.apache.catalina.tribes.transport.Constants; import org.apache.catalina.tribes.transport.ReceiverBase; import org.apache.catalina.tribes.transport.RxTaskPool; import org.apache.catalina.tribes.util.StringManager; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -318,12 +319,8 @@ public class NioReceiver extends ReceiverBase implements Runnable { } catch (java.nio.channels.CancelledKeyException nx) { log.warn("Replication client disconnected, error when polling key. Ignoring client."); } catch (Throwable x) { - try { - log.error("Unable to process request in NioReceiver", x); - }catch ( Throwable tx ) { - //in case an out of memory error, will affect the logging framework as well - tx.printStackTrace(); - } + ExceptionUtils.handleThrowable(x); + log.error("Unable to process request in NioReceiver", x); } } diff --git a/java/org/apache/catalina/util/CharsetMapper.java b/java/org/apache/catalina/util/CharsetMapper.java index fce0f968b..84c4cee62 100644 --- a/java/org/apache/catalina/util/CharsetMapper.java +++ b/java/org/apache/catalina/util/CharsetMapper.java @@ -22,6 +22,8 @@ import java.io.InputStream; import java.util.Locale; import java.util.Properties; +import org.apache.jasper.util.ExceptionUtils; + /** @@ -75,6 +77,7 @@ public class CharsetMapper { map.load(stream); stream.close(); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); throw new IllegalArgumentException(t.toString()); } } diff --git a/java/org/apache/catalina/util/ServerInfo.java b/java/org/apache/catalina/util/ServerInfo.java index 348a13ed4..b7f302bea 100644 --- a/java/org/apache/catalina/util/ServerInfo.java +++ b/java/org/apache/catalina/util/ServerInfo.java @@ -22,6 +22,8 @@ package org.apache.catalina.util; import java.io.InputStream; import java.util.Properties; +import org.apache.jasper.util.ExceptionUtils; + /** * Simple utility module to make it easy to plug in the server identifier @@ -64,7 +66,7 @@ public class ServerInfo { serverBuilt = props.getProperty("server.built"); serverNumber = props.getProperty("server.number"); } catch (Throwable t) { - //Ignore + ExceptionUtils.handleThrowable(t); } if (serverInfo == null) serverInfo = "Apache Tomcat 7.0.x-dev"; diff --git a/java/org/apache/catalina/valves/AccessLogValve.java b/java/org/apache/catalina/valves/AccessLogValve.java index ea1feac2f..3e40f2d16 100644 --- a/java/org/apache/catalina/valves/AccessLogValve.java +++ b/java/org/apache/catalina/valves/AccessLogValve.java @@ -44,6 +44,7 @@ import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.util.LifecycleBase; import org.apache.coyote.RequestInfo; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.util.res.StringManager; @@ -606,6 +607,7 @@ public class AccessLogValve extends ValveBase implements AccessLog { try { holder.renameTo(new File(newFileName)); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); log.error("rotate failed", e); } @@ -676,6 +678,7 @@ public class AccessLogValve extends ValveBase implements AccessLog { try { close(); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); log.info("at least this wasn't swallowed", e); } @@ -712,6 +715,7 @@ public class AccessLogValve extends ValveBase implements AccessLog { try { index = Integer.parseInt(month) - 1; } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); index = 0; // Can not happen, in theory } return (months[index]); @@ -880,6 +884,7 @@ public class AccessLogValve extends ValveBase implements AccessLog { try { init = InetAddress.getLocalHost().getHostAddress(); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); init = "127.0.0.1"; } LOCAL_ADDR_VALUE = init; diff --git a/java/org/apache/catalina/valves/ErrorReportValve.java b/java/org/apache/catalina/valves/ErrorReportValve.java index bdb1d3d6d..fe99839a7 100644 --- a/java/org/apache/catalina/valves/ErrorReportValve.java +++ b/java/org/apache/catalina/valves/ErrorReportValve.java @@ -254,6 +254,7 @@ public class ErrorReportValve extends ValveBase { response.setContentType("text/html"); response.setCharacterEncoding("utf-8"); } catch (Throwable t) { + ExceptionUtils.handleThrowable(t); if (container.getLogger().isDebugEnabled()) container.getLogger().debug("status.setContentType", t); } diff --git a/java/org/apache/catalina/valves/ExtendedAccessLogValve.java b/java/org/apache/catalina/valves/ExtendedAccessLogValve.java index 54a41f623..e0e2c37d6 100644 --- a/java/org/apache/catalina/valves/ExtendedAccessLogValve.java +++ b/java/org/apache/catalina/valves/ExtendedAccessLogValve.java @@ -36,6 +36,7 @@ import javax.servlet.http.HttpSession; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.catalina.util.ServerInfo; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; @@ -180,6 +181,7 @@ public class ExtendedAccessLogValve extends AccessLogValve { if ("".equals(svalue)) return "-"; } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); /* Log error */ return "-"; } @@ -612,6 +614,7 @@ public class ExtendedAccessLogValve extends AccessLogValve { try { value = InetAddress.getLocalHost().getHostName(); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); value = "localhost"; } buf.append(value); diff --git a/java/org/apache/catalina/valves/JDBCAccessLogValve.java b/java/org/apache/catalina/valves/JDBCAccessLogValve.java index c5643c8bd..72c04ed9e 100644 --- a/java/org/apache/catalina/valves/JDBCAccessLogValve.java +++ b/java/org/apache/catalina/valves/JDBCAccessLogValve.java @@ -539,6 +539,7 @@ public final class JDBCAccessLogValve extends ValveBase implements AccessLog { Class clazz = Class.forName(driverName); driver = (Driver) clazz.newInstance(); } catch (Throwable e) { + ExceptionUtils.handleThrowable(e); throw new SQLException(e.getMessage()); } }