I am working on an application that streams ResultSet over a network. I ended up using a CachedRowSetImpl class. But when I connect to an Oracle DB, I get an error like this
This is because oracle.sql.TIMESTAMP is not derived from java.sql.TIMESTAMP:
java.lang.Object -> oracle.sql.Datum -> oracle.sql.TIMESTAMP
You can't cast the former into the later.
Instead use oracle.sql.TIMESTAMP.timestampValue():
public Timestamp timestampValue(Calendar cal) throws SQLExceptionCalls
toTimestampto convert internal OracleDateand Calendar to a JavaTimestamp.