in taverna-commandline-common/src/main/java/org/apache/taverna/commandline/CommandLineTool.java [370:392]
private void setupDatabase(CommandLineOptions options)
throws DatabaseConfigurationException {
DatabaseConfigurationHandler dbHandler = new DatabaseConfigurationHandler(
options, databaseConfiguration, databaseManager);
dbHandler.configureDatabase();
try {
if (!options.isInMemory())
dbHandler.testDatabaseConnection();
} catch (NamingException e) {
throw new DatabaseConfigurationException(
"There was an error trying to setup the database datasource: "
+ e.getMessage(), e);
} catch (SQLException e) {
if (options.isClientServer())
throw new DatabaseConfigurationException(
"There was an error whilst making a test database connection. If running with -clientserver you should check that a server is running (check -startdb or -dbproperties)",
e);
if (options.isEmbedded())
throw new DatabaseConfigurationException(
"There was an error whilst making a test database connection. If running with -embedded you should make sure that another process isn't using the database, or a server running through -startdb",
e);
}
}