This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting ClassCastExceptions with CachedRowSet

 
Pradeep Kumar P
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Oracle 8.1.7 database and oracle thin driver.
thanks,
Pradeep
 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic