Author: markt Date: Fri Sep 3 20:37:46 2010 New Revision: 992459 URL: http://svn.apache.org/viewvc?rev=992459&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49865 Allow Tomcat to start if catalina.properties is not present
Modified: tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java?rev=992459&r1=992458&r2=992459&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/CatalinaProperties.java Fri Sep 3 20:37:46 2010 @@ -26,7 +26,6 @@ import java.util.Enumeration; import java.util.Properties; import org.apache.catalina.Globals; -import org.apache.tomcat.util.ExceptionUtils; /** @@ -99,8 +98,7 @@ public class CatalinaProperties { is = (new URL(configUrl)).openStream(); } } catch (Throwable t) { - // TODO Throws NoClassDefFoundError for ExceptionUtils - ExceptionUtils.handleThrowable(t); + handleThrowable(t); } if (is == null) { @@ -110,8 +108,7 @@ public class CatalinaProperties { File properties = new File(conf, "catalina.properties"); is = new FileInputStream(properties); } catch (Throwable t) { - // TODO Throws NoClassDefFoundError for ExceptionUtils - ExceptionUtils.handleThrowable(t); + handleThrowable(t); } } @@ -120,8 +117,7 @@ public class CatalinaProperties { is = CatalinaProperties.class.getResourceAsStream ("/org/apache/catalina/startup/catalina.properties"); } catch (Throwable t) { - // TODO Throws NoClassDefFoundError for ExceptionUtils - ExceptionUtils.handleThrowable(t); + handleThrowable(t); } } @@ -179,5 +175,15 @@ public class CatalinaProperties { return System.getProperty("catalina.config"); } + // 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=992459&r1=992458&r2=992459&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Fri Sep 3 20:37:46 2010 @@ -111,6 +111,10 @@ and Tomcat 7. (markt) </fix> <fix> + <bug>49865</bug>: Tomcat failed to start if catalina.properties was not + present. (markt) + </fix> + <fix> <bug>49876</bug>: Fix the generics warnings in the copied Apache Jakarta BCEL code. Based on a patch by Gábor. (markt) </fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org