Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CachedRowSetImpl cannot be resolved to a type

I'm using CachedRowSet to hold the ResultSet form DB. According some demo code: I write below code:

CachedRowSetImpl crs = new CachedRowSetImpl();

But eclipse prompt me that CachedRowSetImpl cannot be resolved to a type. So I know I need to import some package. But I don't know which one to import? Anyone knows?

like image 230
roast_soul Avatar asked Feb 05 '13 02:02

roast_soul


3 Answers

CachedRowSetImpl class is packaged in rt.jar. So you don't need to add any jar for this class. Can you try to remove JRE currently added to eclipse buildpath and again re-add it.

like image 86
Yogesh Ralebhat Avatar answered Nov 19 '22 04:11

Yogesh Ralebhat


Use this code:

import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl

...

CachedRowSet rowSet = new CachedRowSetImpl();
like image 25
S.Yavari Avatar answered Nov 19 '22 05:11

S.Yavari


If your eclipse classpath is properly set, I mean the jar that includes is in eclipse classpath, then use ctrl+shift+o. This will organize the imports. Adding the missing import and removing the unnecessory.

like image 1
Jaydeep Patel Avatar answered Nov 19 '22 04:11

Jaydeep Patel