I'm trying to set a BLOB in MySQL DB as below:
PreparedStatement ps=con.prepareStatement("insert into image values(?,?,?,?,?)");
ps.setString(1,firstname);
ps.setString(2,lastname);
ps.setString(3,address);
ps.setString(4,phone);
if(is!=null)
{
ps.setBlob(5,is);
}
int i=ps.executeUpdate();
The line ps.setBlob(5,is)
throws the below exception:
java.lang.AbstractMethodError: com.mysql.jdbc.PreparedStatement.setBlob(ILjava/io/InputStream;)V
How it this caused and how can I solve it?