I am new to spring framework and trying my best to understand. I am using Spring NamedParameterJDBC template for my operations
I am having this code in DAO
SqlParameterSource paramSource = new BeanPropertySqlParameterSource(
positionDO);
KeyHolder keyHolder = new GeneratedKeyHolder();
return this.jdbcTemplate.update(sql, paramSource, keyHolder);
The problem is when I execute, I am getting this error
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL
[INSERT INTO POSITION_TABLE VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [null];
error code [0];
java.lang.AbstractMethodError: oracle.jdbc.driver.OracleConnection.prepareStatement(Ljava/lang/String;I)
Ljava/sql/PreparedStatement;
I googled and found that this is problem with old Ojdbc drivers like ojdbc14 which don't send auto generated keys. Now I am unable to find what to do to load latest ojdbc driver by Spring OR any other way to do the same operation.
I am assuming spring-jdbc will be having default ojdbc driver. Am i correct? Because i didn't add any other drivers to my project.
--> Without Auto generate key, the whole process is working fine.