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
royjaydAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
Can you post the *actual* code for StaffCacheLoad? The edited version that you have here is of no use to us.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
Don't paraphrase code, post it verbatim. Stuff like the following wouldn't even compile
Map myMap = new HashMap<Staff>()

Open in new window

0
royjaydAuthor Commented:
no worries, i resolved it.
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.