diff --git a/src/java/com/wasteinformationserver/db/JDBC.java b/src/java/com/wasteinformationserver/db/JDBC.java index 1535595..463f525 100644 --- a/src/java/com/wasteinformationserver/db/JDBC.java +++ b/src/java/com/wasteinformationserver/db/JDBC.java @@ -152,12 +152,12 @@ public class JDBC { */ public void checkDBStructure() { try { - ResultSet seti = executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '" + dbnamec + "'"); seti.last(); Log.Log.debug("found " + seti.getInt(1) + " tables in db"); if (seti.getInt(1) != 5) { // structure not valid + Log.Log.info("recreating Database structure!"); Scanner s = new Scanner(getClass().getResourceAsStream("/db.sql")); s.useDelimiter("(;(\r)?\n)|(--\n)"); Statement st = null; @@ -180,8 +180,8 @@ public class JDBC { } else { Log.Log.message("found valid database structure!"); } - } catch (SQLException throwables) { - throwables.printStackTrace(); + } catch (SQLException e) { + Log.Log.error("a unhandled SQLexception occured at db structure creation."); } } } diff --git a/src/resources/wwwroot/register.html b/src/resources/wwwroot/register.html index c463af3..cd5f45f 100644 --- a/src/resources/wwwroot/register.html +++ b/src/resources/wwwroot/register.html @@ -3,19 +3,17 @@ Login Page - + + - - + + - - + + - - - - - + +