Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Issue related to "jdbcTemplate.queryForList(sqlForExtract)"

 
muruga dhanapal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please do NOT post the same question multiple times, or in wrong forums.
Let us continue the discussion in your original post here http://www.coderanch.com/t/572577/JDBC/java/related-jdbcTemplate-queryForList-sqlForExtract
 
    Bookmark Topic Watch Topic
  • New Topic