Dear Friends,
I have an issue in the production.what am trying to do is I have seven extracter spring bean out of that am getting an exception while processing the seventh bean.The problem is am using this "jdbcTemplate.queryForList(sqlForExtract)" method for fetching the data fom DB. Its a date field and the issue is, becasue of this date field when am getting a valid value its working fine and whenever there is "NULL" it takes it as
string and throws the following exception.
My understanding is by using this method its trying to map the list in some format and there occurs problem.
This is my error log
Caused by: java.sql.SQLException: [SQL0181] Value in date, time, or timestamp string not valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:485)
at com.ibm.as400.access.JDServerRowCache.fetch(JDServerRowCache.java:252)
at com.ibm.as400.access.JDServerRowCache.fetch(JDServerRowCache.java:183)
at com.ibm.as400.access.JDServerRowCache.next(JDServerRowCache.java:588)
at com.ibm.as400.access.AS400JDBCResultSet.next(AS400JDBCResultSet.java:1700)
UG Development - UGCUAT
at org.apache.commons.dbcp.DelegatingResultSet.next(DelegatingResultSet.java:169)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:91)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:423)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:371)
Can you please give a programmatic approach to handle this issue.
Frineds please give your valid inputs to solve this issue. Thanks in advance.