Author: markt Date: Wed Sep 29 10:15:51 2010 New Revision: 1002562 URL: http://svn.apache.org/viewvc?rev=1002562&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50021 Don't reference ExceptionUtisl from Bootstrap - it won't be visible at startup.
Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java?rev=1002562&r1=1002561&r2=1002562&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java Wed Sep 29 10:15:51 2010 @@ -35,7 +35,6 @@ import org.apache.catalina.Globals; import org.apache.catalina.security.SecurityClassLoad; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; -import org.apache.tomcat.util.ExceptionUtils; /** @@ -99,7 +98,7 @@ public final class Bootstrap { catalinaLoader = createClassLoader("server", commonLoader); sharedLoader = createClassLoader("shared", commonLoader); } catch (Throwable t) { - ExceptionUtils.handleThrowable(t); + handleThrowable(t); log.error("Class loader creation threw exception", t); System.exit(1); } @@ -393,7 +392,7 @@ public final class Bootstrap { try { bootstrap.init(); } catch (Throwable t) { - ExceptionUtils.handleThrowable(t); + handleThrowable(t); t.printStackTrace(); return; } @@ -423,7 +422,7 @@ public final class Bootstrap { log.warn("Bootstrap: command \"" + command + "\" does not exist."); } } catch (Throwable t) { - ExceptionUtils.handleThrowable(t); + handleThrowable(t); t.printStackTrace(); } @@ -502,4 +501,14 @@ public final class Bootstrap { } + // Copied from ExceptionUtils since that class is not visible during start + private static void handleThrowable(Throwable t) { + if (t instanceof ThreadDeath) { + throw (ThreadDeath) t; + } + if (t instanceof VirtualMachineError) { + throw (VirtualMachineError) t; + } + // All other instances of Throwable will be silently swallowed + } } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1002562&r1=1002561&r2=1002562&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Sep 29 10:15:51 2010 @@ -175,6 +175,11 @@ <bug>50018</bug>: Fix some minor Javadoc errors in Jasper source. Based on a patch by sebb. (timw) </fix> + <fix> + <bug>50021</bug>: Correct a regression in the fix for <bug>46844</bug> + that may have caused additional problems during a failure at start up. + (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org