Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CachedRowSet is an abstract class

 
Francois Bourgault
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
This afternoon I was using the CacheRowSet() and it was working just fine. Now for the last 1/2 hour I get the following error;
Generated servlet error:
C:\Apache\jakarta-tomcat\work\localhost\myServlets\Src\calendar_0005fwk_0005fmt_0005fsummary$jsp.java:174: class sun.jdbc.rowset.CachedRowSet is an abstract class. It can't be instantiated.
CachedRowSet aResultSet = new CachedRowSet();
Nothing has changed in my setup. I added the rowset.jar in the classpath and it used to work. Any idea what may caused the above error?
Thanks,
Francois.
 
Francois Bourgault
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works now. I was trying to do something like this:
ResultSet rs = stmt.executeQuery("SELECT * FROM EMPLOYEES");
CachedRowSet crs = new CachedRowSet();
crs.populate(rs);
this is taken from Sun's documentation - CachedRowSet. Oh Well!!!
Thanks
Francois
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it's in the documentation because it works that way too. Funny, cuz I used that code before and it worked for me.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!