Incompatible serial version between ant and eclipse [message #98832] |
Thu, 25 September 2003 10:18 |
Eclipse User |
|
|
|
Originally posted by: yonatan.nlayers.com
I'm using Eclipse 2.1.1 setting compile options to conform only to 1.4
version. I use ant to compile and assemble my ear file.
When running JUnit from Eclipse, thus using Eclipse compiled classes,
I sometimes get the following exception:
....
....
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:167)
Caused by: java.io.InvalidClassException:
com.nlayers.seneca.common.Tier; local class incompatible: stream
classdesc serialVersionUID = 6051650768286608398, local class
serialVersionUID = -3570955767759101739
The classes are indeed different in size when comparing.
I tried setting various compile options in Eclipse and ant but all for
no avail. Has anyone encountered similiar problems or has any suggestions?
|
|
|
|
Re: Incompatible serial version between ant and eclipse [message #98876 is a reply to message #98832] |
Thu, 25 September 2003 11:29 |
Eclipse User |
|
|
|
Originally posted by: olivier_thomann.ca.ibm.comNOSPAM
Le Thu, 25 Sep 2003 13:18:25 +0300, Yonatan Taub <yonatan@nlayers.com>
a écrit :
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:167)
>Caused by: java.io.InvalidClassException:
>com.nlayers.seneca.common.Tier; local class incompatible: stream
>classdesc serialVersionUID = 6051650768286608398, local class
>serialVersionUID = -3570955767759101739
It has nothing to do with ant. You are not using the same compiler on
both sides and that is what you should do if you don't want to specify
the serial version id inside your code (this is the most portable
solution).
A workaround for you is to use exactly the same Eclipse compiler
inside your ant script using the ant javac adapter provided by
Eclipse.
--
Olivier
|
|
|
Powered by
FUDForum. Page generated in 0.02855 seconds