The program is not accepting the query given below-
public class loginDaos {
public void create(loginBean bean) {
ConnectionPool c = Connecti
When you are using a PreparedStatement, then you should use the executeQuery(), executeUpdate() or execute() method that does not take a String parameter.
So to fix the problem use:
// ....
pstmt.setString(3, bean.getPassword());
pstmt.setString(4, bean.getPosition());
pstmt.executeUpdate();
The MySQL driver implementation has a bug, because the JDBC specification states that the methods accepting a string should throw an SQLException when called on a PreparedStatement or CallableStatement implementation. In this case it only throws the exception because it tries to execute the parametrized query directly.