Hi,i am trying to update records in DataBase using spring batch
I have customReader and customWriter classes to read and write to databse
when i run job i am able to read from database but while updating the records
I am getting following exception:

java.lang.NoClassDefFoundError: org/springframework/dao/DuplicateKeyException


My Update method is as follows :

public void update(String col,String val){
System.out.println("IN update method");
ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext("applicationDB.xml" );
DataSource dataSource = (DataSource) appContext.getBean("dataSource");
String sql="update person set fname = ? where fname = ? ";
jdbcTemplate = new JdbcTemplate(dataSource);
jdbcTemplate.update(
sql,
new Object[] {col, val}
);
}