Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue related to "jdbcTemplate.queryForList(sqlForExtract)"

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://coderanch.com/t/572577/JDBC/java/related-jdbcTemplate-queryForList-sqlForExtract
 
    Bookmark Topic Watch Topic
  • New Topic