File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Getting ClassCastExceptions with CachedRowSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Getting ClassCastExceptions with CachedRowSet" Watch "Getting ClassCastExceptions with CachedRowSet" New topic

Getting ClassCastExceptions with CachedRowSet

Pradeep Kumar P

Joined: Aug 29, 2003
Posts: 2
The exception is generated on calls to CachedRowSet.getDate and getTimestamp.
This was working fine under jdk1.3.1 and is broken under 1.4.
I've traced back the code in and it seems fine, not doing anything weird, also the exception is coming from within CachedRowSet (line 1966 for getTimestamp and line 1821 for getDate).
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

which database and version are you using?
which JDBC driver and version are you using?
there are some drivers out there with CachedRowSet problems like
i-net OPTA 2000 for MS SQL Server and JTurbo drivers
Pradeep Kumar P

Joined: Aug 29, 2003
Posts: 2
I am using Oracle 8.1.7 database and oracle thin driver.
Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
I do not think it's the Oracle database or driver, since I'm having the same problems. I myself am running j2sdk1.4.1_02, with the oracle thin driver, and accessing an Oracle database and all is working fine. However, my teammates are using the same database, and same oracle driver -- yet they are getting ClassCastException on CachedRowSet. They are running j2sdk1.4.2. So, my first guess is it may be the j2sdk version. We haven't really examined this problem closely yet (put it on the back burner). If it's not the version, perhaps some configuration issue? We have our rowset.jar in JAVA_HOME/jre/lib/ext, and we've set the CLASSPATH as well, yet it continues to work on my machine, and not their's. If you come up with anything, please post in this thread. Thanks--

for (int i = today; i < endOfTime; i++) { code(); }
I agree. Here's the link:
subject: Getting ClassCastExceptions with CachedRowSet
It's not a secret anymore!