- public void start( ) throws Exception {
- // just in case a previous run was killed without the
- // cleanup
- cleanPersistentStorage( );
-
- // set database path.
- Properties lProperties = System.getProperties( );
- lProperties.put( SYSTEM_PATH_PROPERTY, DATABASE_PATH );
-
- Class.forName( "org.apache.derby.jdbc.EmbeddedDriver" ).newInstance( );
-
- runDatabase( );
-
- waitUntilStartedOrStopped( true );
-
- // Force creation of the database.
- Connection lConnection = createConnection( );
- lConnection.close( );
+ public void start() {
+ try {
+ // just in case a previous run was killed without the
+ // cleanup
+ cleanPersistentStorage();
+
+ // set database path.
+ Properties lProperties = System.getProperties();
+ lProperties.put(SYSTEM_PATH_PROPERTY, DATABASE_PATH);
+
+ Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
+
+ runDatabase();
+
+ waitUntilStartedOrStopped(true);
+
+ // Force creation of the database.
+ Connection lConnection = createConnection();
+ lConnection.close();
+ } catch (Exception e) {
+ throw new RuntimeException("Problem starting database", e);
+ }