Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

EJB getHandle()

843829Jul 14 2003 — edited Jul 16 2003
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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 13 2003
Added on Jul 14 2003
8 comments
349 views