Is the 'WHERE' duplicated? It looks like it should be in the base class or the parameters in the child classes, but not both.public ViewRegMappingSqlQuery(DataSource ds, String where)\n {\n super(ds, "SELECT * FROM users WHERE " + where);\n }\n\n...\n\nthis.loginQuery = new UserQuery(ds, "WHERE user_id = ? AND password = ?");