Link to home
Start Free TrialLog in
Avatar of Jay Roy
Jay RoyFlag for United States of America

asked on

error on serialization

hi guys

I am using Oracle Coherence as my distibuted cache

On a high level what i do is get a reference to the cache and set the values to it like:

 
import com.tangosol.net.NamedCache;   

public class StaffCacheLoad{

NamedCache namedCacheReference = CacheFactory.getCache("staffMap");//staffMap cache is defined in coherence	 

Map myMap = new HashMap<Staff>()

for (Staff obj : staffList) {
myMap.put(obj.getId(),obj.getDesc())
}

namedCacheReference.putAll(myMap);

..
}

Open in new window



public class Staff implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

id
desc

get()
set()

Open in new window


now when the above process runs i get this error


Error during processing StaffCacheLoad(Wrapped) com.eway.model.Staff; local class incompatible: stream classdesc serialVersionUID = 4247448966215819804, local class serialVersionUID = 1
(Wrapped) java.io.InvalidClassException: com.eway.model.Staff; local class incompatible: stream classdesc serialVersionUID = 4247448966215819804, local class serialVersionUID = 1



trying to understand why i get this error
Any ideas will be appreciated

thanks
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jay Roy

ASKER

no worries, i resolved it.
thanks