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
I think the problem is your setLastUpdate
is expecting an object of java.sql.Date
type.
Now when you use agent.setLastUpdate(res.getDate(3));
The res.getDate(3)
must be returning an object that your method doesn't expect so your there may be ClassCastException
for that.
Try this code and see whether it solves your problem or not:
agent.setLastUpdate(new java.util.Date(res.getDate(3).getTime()));