perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r6504 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r6504 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r6504 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType
- Date: Thu, 13 Mar 2014 12:45:36 +0000 (GMT)
Author: dante.delvaux
Date: 2014-03-13 12:45:36 +0000 (Thu, 13 Mar 2014)
New Revision: 6504
Modified:
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/FlywayServletListener.java
Log:
SQL MA: better error reporting when no connection to MySQL DB is possible,
see PSSERVICES-691
Modified:
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/FlywayServletListener.java
===================================================================
---
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/FlywayServletListener.java
2014-03-13 10:38:53 UTC (rev 6503)
+++
trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/service/measurementArchive/sqlType/FlywayServletListener.java
2014-03-13 12:45:36 UTC (rev 6504)
@@ -34,8 +34,17 @@
.info("flyway.setLocations to db/migration/" +
jdbc.getDialect());
flyway.migrate();
} catch (FlywayException e) {
+ System.err.println(e.getMessage());
((LoggerComponent)
components.getComponent(ComponentNames.LOGGER))
.fatal("Failed to initialize database: " + e.getMessage());
+ if (e.getMessage() == "Unable to obtain Jdbc connection from
DataSource") {
+ String msg = "This error usually means that the MySQL
database engine is not reachable.\n\n"
+ + "Please check that your MySQL engine is running
and accepting connections. "
+ + "Double check your JDBC configuration (username,
password and URL) "
+ + "in the WebAdmin or in the service.properties
file.\n";
+ System.err.println(msg);
+ ((LoggerComponent)
components.getComponent(ComponentNames.LOGGER)).fatal(msg);
+ }
throw new RuntimeException("Failed to initialize database: " +
e.getMessage(), e);
}
}
- [pS-dev] [GEANT/SA2/ps-java-services] r6504 - trunk/perfsonar-java-sql-ma/src/main/java/org/perfsonar/se rvice/measurementArchive/sqlType, svn-noreply, 03/13/2014
Archive powered by MHonArc 2.6.16.