Skip to content

Accessing Timestamp field from SQLite db using JdbcTemplate [DATAJDBC-3] #260

@spring-projects-issues

Description

@spring-projects-issues

Shrinivaasan opened DATAJDBC-3 and commented

JdbcTemplate is not supporting all the DataBases. An exception is thrown, while accessing Timestamp value from SQLite Db using JdbcTemplate. Since the java.sql.Timestamp values are stored as String/long values in SQLite data base, using the getTimestap() method fails throwing the below exception.

org.springframework.jdbc.InvalidResultSetAccessExc eption: getTime failed on value ( {0} ) in column {1} no conversion available12901443977182; nested exception is java.sql.SQLException: getTime failed on value ( {0} ) in column {1} no conversion available12901443977182
at org.springframework.jdbc.support.rowset.ResultSetW rappingSqlRowSet.getTimestamp(ResultSetWrappingSql RowSet.java:518)
at TestSqliteUsingSpring.getData(TestSqliteUsingSprin g.java:44)
at TestSqliteUsingSpring.main(TestSqliteUsingSpring.j ava:19)
Caused by: java.sql.SQLException: getTime failed on value ( {0} ) in column {1} no conversion available12901443977182
at com.sun.rowset.CachedRowSetImpl.getTimestamp(Unkno wn Source)
at com.sun.rowset.CachedRowSetImpl.getTimestamp(Unkno wn Source)
at org.springframework.jdbc.support.rowset.ResultSetW rappingSqlRowSet.getTimestamp(ResultSetWrappingSql RowSet.java:515)


Attachments:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions