Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Incompatible serial version between ant and eclipse
Incompatible serial version between ant and eclipse [message #98832] Thu, 25 September 2003 10:18 Go to next message
Eclipse UserFriend
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 #98848 is a reply to message #98832] Thu, 25 September 2003 10:46 Go to previous messageGo to next message
Genady Beryozkin is currently offline Genady BeryozkinFriend
Messages: 410
Registered: July 2009
Senior Member
Try using the eclipse Java compile inside your ant files.

Genady

Yonatan Taub wrote:
> 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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Adding popup menu to "Source" submenu of IJavaProject context menu
Next Topic:cut and paste problem with multipageeditors
Goto Forum:
  


Current Time: Wed Jan 15 09:09:28 GMT 2025

Powered by FUDForum. Page generated in 0.02855 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top