May be you have sent some constraints in the table which restricts your program not to add these enteries in the table, check if you have set autoincrement for your primary key and adding the same key again or get the stack trace using e.printStackTrace() in the catch block to get more generic error details.