PDA

View Full Version : JAVA: serialVersionUID error


tatacalu
14 Jun 2007, 10:14am
hey there!

I opened a file with Eclipse SDK 3.2.2, and a certain warning appears:

The serializable class xxx does not declare a static final serialVersionUID field of type long.

After hitting Ctrl-1, a few options appeared, one of them being Add generated serial version ID.

Clicking that, a new line appeared into my class:

private static final long serialVersionUID = -318066740353445032;

Well ,I thought that with this done, I solved the problem, but the warning still remains there..... what can I do??

tatacalu
14 Jun 2007, 10:03pm
Answer found:

I had to rebuild that file again so Eclipse could interpret that problem as "solved". Easy as pie :)

:rockon: