• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to use CachedRowSet

 
Maria Peter
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use CachedRowSet
I downloaded rowset.jar from
http://developer.java.sun.com/developer/earlyAccess/jdbc/jdbc-rowset.html
after unzipping, moved rowset.jar file to Tomcat\common\lib folder
and added the file "rowset.jar" in my classpath.
But still I am not able to compile my servlet
I am getting an error message as
package sun.jdbc.rowset does not exist
Am I missing something I am using jdbc2_0-stdext.jar I think this is jdbc2.0
Gurus please help me
Thanks in Advance
I really appreciate it
Maria
 
Maria Peter
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i copied rowset.jar into rowset.zip .after unzipping
rowset.zip I can see cachedRowSet under javax.sql.rowset
and sun.jdbc.rowset.CachedRowSet is not available
Does it mean i downloaded wrong file?
Please help
Maria
 
Mark Latham
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the class you're looking for is com.sun.rowset.CachedRowSetImpl, not to be confused with the interface javax.sql.rowset.CachedRowSet.
Try this:

If that doesn't work for you, it's a classpath issue (I downloaded the jar from your link and the above code compiled just fine so you don't need a different/additional jar).
 
Maria Peter
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much Mark. I don't get compilation error any more
I tried to use Cached RowSet for sybase.> I'm using sybase 12.5
and the jdbc driver jconn2.jar is 5.5 version.
I get the following exception:
Caused by: com.sybase.jdbc2.utils.UnimplementedOperationException:
The method com.sybase.jdbc2.tds.RowFormatToken.getSchemaName has not been completed
and should not be called.
Looks like the driver does not support the rowset implementation.
Can you please tell me which DBMS driver are you using? Does it work with DB2?
Thanks for your help
Maria
 
Mark Latham
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I merely downloaded the jar file to validate why I thought you were getting compilation errors; I'm not actually using CachedRowSet.
Now that you're getting it to compile, you'll probably get a more informed response to your CachedRowSet questions from the JDBC forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic