I don't know why but this line gives me an error. I'm first making a few private strings, host, port, database, user and password. Then I'm setting those strings in the constructor.
Connection conn = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + database + "?user=" + user + "&password=" + password);
This is the error message that I get:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot load connection class because of underlying exception: 'java.lang.Number FormatException: For input string: "null"'.
What did I do wrong here?