This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply locked New topic
Author

Issue related to "jdbcTemplate.queryForList(sqlForExtract)"

muruga dhanapal
Greenhorn

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.
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

Joined: Jul 26, 2007
Posts: 10532
    
    9

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


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue related to "jdbcTemplate.queryForList(sqlForExtract)"