wood burning stoves 2.0*
The moose likes I/O and Streams and the fly likes local class incompatible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "local class incompatible" Watch "local class incompatible" New topic
Author

local class incompatible

saravana kumar
Ranch Hand

Joined: Jun 25, 2002
Posts: 72
Hi All,

I am getting the following error when i call a remote application. i have attached my program and error.

can anyone of you know how to solve this problem ?

Thanks


My Program
------------------
public class ABCServiceImpl implements ABCService,Serializable {
-
-
-
-
private static final long serialVersionUID = -6944625812039322816L;
public Map verifyLogin(String name,String pwd) {
if(System.getSecurityManager()==null)
{
myRMISecurityManager sm = new myRMISecurityManager();
System.setSecurityManager(sm);
}

try{

WFSessionFactory.createSession(wfEValue, name, pwd, true);
}catch(WFException e )
{
System.out.println("error in connection");

}

}

}

private static class myRMISecurityManager extends RMISecurityManager {

public myRMISecurityManager() {
}
public void checkPermission(Permission perm, Object context) {
}
public void checkPermission(Permission perm ) {
}
}


error
--------
[WKT.020.0019] Remote method invocation failed with RemoteException, com.wm.zeus.pd.rt.RTUser; local class incompatible: stream classdesc serialVersionUID = 5159583942181034859, local class serialVersionUID = -6944625812039322816, reconnection attempt in progress...
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
At first sight seems that your client and your server have different versions of the same class com.wm.zeus.pd.rt.RTUser.

If your client and your server are not downloading the code from the same place, probably, the server or the client class in question has been updated with a new version of serialVersionUID.

Make sure that both distributions, client and server, have the same versions of the classes. Or build again the distribution files for server and clients to make sure.
saravana kumar
Ranch Hand

Joined: Jun 25, 2002
Posts: 72
Thanks Edwin.

As you said the file in server and local were different. now issue has been solved.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: local class incompatible