Hi guys !!!!
i've a little problem using the function getHandle() to get the handle of an Stateful EJB . My AppServer is Orion 2.0.1
Give a look to this piece of code :
package test;
import java.util.*;
import java.io.*;
import java.rmi.RemoteException;
import javax.naming.*;
import javax.rmi.*;
import javax.ejb.*;
import com.evermind.server.ejb.*;
import myejb.*;
public class ClientHandle
{
public static void main(String[] args)
{
try
{
Context context = new InitialContext();
Mysessionhome homeObj = (Mysessionhome)context.lookup("ejb/MioSession");
MySessionRemote Bean = (MySessionRemote)homeObj.create(-666);
Handle oMyHandle = Bean.getHandle();
ArrayList oData = new ArrayList();
oData.add(new String("ciao"));
Bean.putData(oData);
oData=null;
Bean.remove();
}
catch (Exception ex) { ex.printStackTrace(); }
}
}
On this line of code :
Handle oMyHandle = Bean.getHandle()
is generated the following exception
java.rmi.UnmarshalException: Error deserializing return-value: java.io.InvalidClassException: com.evermind.server.ejb.StatefulSessionHandle; local class incompatible: stream classdesc serialVersionUID = -1212978352730626745, local class serialVersionUID = 631107630195966815
at com.evermind._al.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(.:1497)
at com.evermind._al.invokeMethod(.:1420)
at com.evermind._fr.invoke(.:53)
at com.evermind._fq.invoke(.:22)
at com.evermind._jj.invoke(.:31)
at __Proxy1.getHandle(Unknown Source)
at test.ClientHandle.main(ClientHandle.java:23)
What does it mean? How can i solve the problem?
thanx