EJB programming & troubleshooting: problem while running client program in weblogic5.1.0. stateless

  1. hi all,
           i written a stateless session bean.in this bean i used only one method in my remote interface.that method returns ResultSet.i used weblogic.jdbc.oci.Driver in my program.My url is jdbc:weblogic:oracle.i am calling that mehod which is defined in remote interface in client.after deploying jar file and running the client program we are getting the following error.
    java.rmi.RemoteException: ; nested exception is: weblogic.rmi.ServerException:a remote exception occured while executing the method on the remote object
    - with nested exception:[weblogic.rmi.MarshalException:error marshalling return with nested exception:[java.io.IOException:class weblogic.jdbc.oci.ResultSet with code=123 does not implement Serializable,Externalizable of WLSerializable]

    advance thanks

  2. Sending resultset over network is not at all recommended. An ejb has to do the job of extracting the values from a result set and sending it as an ArrayList or a vector which contains serializable objects.

    I guess there isn't a way to use Resultsets across network unless you inherit a class from ResultSet and also make it serializable.
  3. Try using a CachedRowSet. Many people have expressed their opinions, in this site, of using this..I personally never used it but sounds to be a valuable option.