File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Issue related to Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply locked New topic

Issue related to "jdbcTemplate.queryForList(sqlForExtract)"

muruga dhanapal

Joined: Jun 02, 2010
Posts: 24
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.
UG Development - UGCUAT
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(
at org.springframework.jdbc.core.JdbcTemplate.execute(

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

Joined: Jul 26, 2007
Posts: 10825

Please do NOT post the same question multiple times, or in wrong forums.
Let us continue the discussion in your original post here

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: Issue related to "jdbcTemplate.queryForList(sqlForExtract)"
It's not a secret anymore!