File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Getting ClassCastExceptions with CachedRowSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting ClassCastExceptions with CachedRowSet" Watch "Getting ClassCastExceptions with CachedRowSet" New topic
Author

Getting ClassCastExceptions with CachedRowSet

Pradeep Kumar P
Greenhorn

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).
thanks,
Pradeep
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
Jamie
Pradeep Kumar P
Greenhorn

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

Joined: Jun 06, 2003
Posts: 136
Pradeep,
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--
WS


for (int i = today; i < endOfTime; i++) { code(); }
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Getting ClassCastExceptions with CachedRowSet