hello i get this exception when i try to store image in database (phpmyadmin) this is the exception `java.lang.AbstractMethodError: Method com/mysql/jdbc/ServerPreparedStatement.setBlob(ILjava/io/InputStream;)V is abstract
and this is the code where i get the exception
public int createUser(String username, String password, InputStream image) throws SQLException {
try {
ps = con.prepareStatement(INSERT_USER_QUERY);
ps.setString(1, username);
ps.setString(2, password);
ps.setBlob(3, image);
return ps.executeUpdate();
} catch (SQLException ex) {
} finally {
ps.close();
}
return -1;
}
and here where i use the method
public void regAction() throws FileNotFoundException, SQLException {
if (validateRegisterFields()) {
InputStream in = new FileInputStream(new File(registerView.getImage()));
int created = userManger.createUser(registerView.getUsernameJTextfield().getText(), registerView.getPasswordJPasswordField().getText(), in);
if (created != 0) {
JOptionPane.showMessageDialog(registerView, "Done the user has been created");
} else {
JOptionPane.showMessageDialog(registerView, "There was an error");
}
} else {
JOptionPane.showMessageDialog(registerView, "Error empty Field");
}
}
i cant find the mistake in my code .. so what is the problem?