CachedRowSetImpl cannot be resolved to a type

Use this code:

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

...

CachedRowSet rowSet = new CachedRowSetImpl();

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.


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.