My operating system is Windows 7 64-bit. I am working with Eclipse Luna. I am exploring migration from JBoss 4.2.3 to Wildfly 8.2.1.
I created a simple web app to test out com.sun.rowset.CachedRowSetImpl which I believe is part of JDK.
I created a class RowSetAdaptor as a wrapper for CachedRowSetImpl class:
package com.srh.util;
import java.io.Serializable;
import java.sql.SQLException;
import com.sun.rowset.CachedRowSetImpl;
public class RowSetAdaptor implements Serializable {
   private CachedRowSetImpl rowset;
   public RowSetAdaptor() {
      try {
         rowset = new CachedRowSetImpl();
      } catch (SQLException sqle) {
         System.out.println("RowSetAdaptor: constructor: SQLException=" + sqle);            
      }     
   }
}
Then I create a listener class AppContextListener:
package com.srh.listener;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import com.srh.util.RowSetAdaptor;
public class AppContextListener implements ServletContextListener {
    public AppContextListener() {
    }
    public void contextInitialized(ServletContextEvent arg0) {
        RowSetAdaptor rsa = null;
        rsa = new RowSetAdaptor();
        System.out.println("AppContextListener: after create: rsa=" + rsa);
    }
    public void contextDestroyed(ServletContextEvent arg0) {
    }
}
Deploy the app to Jboss 4.2.3 and get the correct output in server.log:
AppContextListener: after create: rsa=com.srh.util.RowSetAdaptor@2a9073ef
Deploy the same app to Wildfly 8.2.1 and get a NoClassDefFoundError in server.log for CachedRowSetImpl :
Caused by: java.lang.NoClassDefFoundError: com/sun/rowset/CachedRowSetImpl
Since com.sun.rowset.CachedRowSetImpl is part of JDK so why is Wildfly giving this error? I am confused. How to resolve this issue?
Thanks
