You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/02/14 10:17:49 UTC
svn commit: r744436 -
/servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
Author: ffang
Date: Sat Feb 14 09:17:49 2009
New Revision: 744436
URL: http://svn.apache.org/viewvc?rev=744436&view=rev
Log:
[SMX4KNL-72] If there is no etc/startup.properties, the kernel hangs without displaying any error
Modified:
servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
Modified: servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java?rev=744436&r1=744435&r2=744436&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java (original)
+++ servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java Sat Feb 14 09:17:49 2009
@@ -738,8 +738,9 @@
* </p>
*
* @return A <tt>Properties</tt> instance or <tt>null</tt> if there was an error.
+ * @throws Exception
*/
- private Properties loadConfigProperties() {
+ private Properties loadConfigProperties() throws Exception {
// The config properties file is either specified by a system
// property or it is in the conf/ directory of the Felix
// installation directory. Try to load it from one of these
@@ -811,7 +812,7 @@
return configProps;
}
- private static Properties loadPropertiesFile(URL configPropURL) {
+ private static Properties loadPropertiesFile(URL configPropURL) throws Exception {
// Read the properties file.
Properties configProps = new Properties();
InputStream is = null;
@@ -821,7 +822,9 @@
is.close();
}
catch (FileNotFoundException ex) {
- // Ignore file not found.
+ if (configPropURL.getFile().lastIndexOf(STARTUP_PROPERTIES_FILE_NAME) != -1) {
+ throw ex;
+ }
}
catch (Exception ex) {
System.err.println(